Marc Knaup
12/22/2020, 4:23 PMkotlinx-coroutines-reactive
-based coroutines using runBlockingTest
?
The related issue (https://github.com/Kotlin/kotlinx.coroutines/issues/1204) and pull request (https://github.com/Kotlin/kotlinx.coroutines/pull/1206) seem to be abandoned for a long time.Giorgos Neokleous
12/22/2020, 4:38 PMMarc Knaup
12/22/2020, 4:41 PMGiorgos Neokleous
12/22/2020, 4:44 PMMarc Knaup
12/22/2020, 5:01 PMFlow
here though.Marc Knaup
12/22/2020, 6:26 PMlaunch { delay(100); repeat(100) { Thread.sleep(10); yield() } }
right before calling my reactive-based coroutines. That gives these coroutines a chance to complete their work before the test dispatcher is responsive again, which avoids the problem.Marc Knaup
12/22/2020, 11:39 PMrunBlocking {}
also helps ❤️