Is there an easy way to use Espresso idling resour...
# coroutines
i
Is there an easy way to use Espresso idling resources with coroutines? I'm not sure how I can make sure that my espresso tests waits until all coroutines finish running.
l
Isn't
runBlocking
enough?
i
I confess that I never tried it on espresso tests, only on unit tests. This works for you?
unfortunately I believe it will not work, because the coroutines are started on the device, not on the same thread as the tests. There is a open issue on github about using idling resources with coroutines. I was wondering how this is being handling until this issue gets merged: https://github.com/Kotlin/kotlinx.coroutines/issues/242
m
there are couple solutions in the issue you linked
you just have to copy paste them and tweak them a bit 😉
151 Views