Hello everyone! RX has `testScheduler` and it has...
# android
v
Hello everyone! RX has
testScheduler
and it has
triggerActions()
. Is there any analogue in coroutines? I’m looking for an analogue in runBlockingTest, but this has an experimental API.
o
(I might be wrong, I don't know RX, but I assume it's the same)
v
Yes and no) It’s also in ExperimentalCoroutinesApi.
o
I also used
Dispatchers.Unconfined
to execute coroutines sequentially, removing asynchronicity
it makes tests more reliable (hiding some concurrent access bugs though… but covered in integration tests)
it's less powerful though and doesn't answer all use cases (like pausing, resuming, moving forward in time…)
v
Thank! I need to pause the coroutine, check the state at loading, and then continue.