KotlinX.Coroutines.test question: can something else than the CoroutineContext of a coroutine impact the behavior of
delay()
? I have a weird case where a coroutine is blocked indefinitely on
delay(1)
. I have compared the CoroutineContext with other places in the code where
delay(1)
correctly finishes immediately, and they are the same. What else should I try to find the source of the issue?
When I say it runs indefinitely, I really do mean indefinitely. Even setting the timeout argument of
runTest
or using
withTimeoutOrNull
doesn't stop it.
CLOVIS
04/09/2023, 10:51 AM
Found the cause: I had a coroutine that was actively waiting on a condition (