Can some one explain why does this test of a Room ...
# android
h
Can some one explain why does this test of a Room DAO never complete?
Copy code
// DaoTest.kt
@Test
fun synchronizeTest() = runBlocking<Unit> {
  var samples = SampleData.Launches.dataset1()
  dao.synchronize(samples)
  samples = SampleData.Launches.dataset2()
  dao.synchronize(samples)
  val actual = dao.all()
  assertTrue(actual.all { it.dataset == 2 })
}
----------------------------------------------

// Dao.kt
@Query("DELETE FROM launch")
abstract suspend fun clearTable()

@Transaction
open suspend fun synchronize(allLaunches: List<Launch>) {
  clearTable()
  saveAll(allLaunches)
}
The control flow never moves past the first
dao.synchronize()
call.