https://kotlinlang.org logo
#coroutines
Title
# coroutines
z

zak.taccardi

04/03/2020, 8:49 PM
I’m attempting to use a
TestCoroutineScope
to control when an
actor
coroutine processes messages. I did the following: 1. Constructed
actor
with
TestCoroutineScope
via
runBlockingTest { .. }
2. used
testCoroutineScope.pauseDispatcher()
3. called
actor.send(message)
And without ever calling
pauseDispatcher()
, the
actor
receives and processes the
message
. Is this intentional?
had to add a
delay(1)
in the places where I wanted to pause dispatching. Weird. Luckily, I was able to do this in my production code (not test code)