Allan Wang
06/24/2020, 12:08 AMIan Lake
06/24/2020, 12:33 AMInstantTaskExecutorRule
? Why would you need that if you're testing coroutines? The regular Coroutines testing is usually enough: https://kotlin.github.io/kotlinx.coroutines/kotlinx-coroutines-test/Allan Wang
06/24/2020, 12:35 AMGiorgos Neokleous
06/24/2020, 7:54 AMwasyl
06/24/2020, 8:06 AMInstantTaskExecutorRule
? What context are used in your tests? I find it best to either test everything using instant executor/unconfined dispatcher so that tests run synchronously, or test specifically with background dispatchers but I make sure there’s no Android framework in tested classes then (or I use Robolectric)Allan Wang
06/26/2020, 12:47 AMwithContext
is just freezing. If I make tests unconfined, I run into the problem of having no looper in certain threads. If I can resolve the looper issue then I think unconfined without instant task may work