When I try to debug compose multiplatform UT using...
# coroutines
a
When I try to debug compose multiplatform UT using
runTest
in commonTest and add the debug point for more than 1m, it crashes with below exception
Copy code
After waiting for 1m, the test body did not run to completion
kotlinx.coroutines.test.UncompletedCoroutinesError: After waiting for 1m, the test body did not run to completion
shouldn't it see that debug is attached and and don't count that time(when it is attached)?
e
there isn't really a Java-supported way to determine if a debugger is attached… as a fallback, it's somewhat common practice to scan
RuntimeMXBean.getInputArguments()
but that doesn't work for debuggers attached at runtime for example
I think you could file a https://github.com/Kotlin/kotlinx.coroutines/issues/new?template=feature_request.md for at least that to affect
kotlinx.coroutines.test.default_timeout
though
n
increase timeout explicity runTest(timeout = 10.minutes) { // your test code } kotlin.time.Duration.Companion.minutes
👎🏻 1
👍 1
timeout = Duration.INFINITE
👎🏻 1
why ?