https://kotlinlang.org logo
Title
a

ansman

12/01/2021, 10:29 PM
Is there any way using the new test helpers to not skip delays during a test but rather controlling them using a
TestCoroutineScheduler
? I see
TestCoroutineScheduler
being used but delays are still being skipped which is super confusing to me as I don’t see the point of it if delays aren’t skipped
a

Alex Vanyo

12/01/2021, 11:47 PM
It seems like the behavior is something like “delays are automatically advanced when a
delay
is stopping
runTest
from finishing” So if you
launch
work in
runTest
that calls a
delay
or multiple delays, any
delay
calls won’t run until: • You advance the scheduler manually to run them • You suspend waiting for something that is in turn waiting for a
delay
(in which case delays start being skipped)
n

Nick Allen

12/02/2021, 1:24 AM
Do you have a simple repro example of what's not working the way you'd expect?