:mega: kotlinx.coroutines 1.7.1 release is here! T...
# coroutines
d
📣 kotlinx.coroutines 1.7.1 release is here! This is a bugfix release. Changelog: https://github.com/Kotlin/kotlinx.coroutines/releases/tag/1.7.1
👍 2
🎉 3
thank you color 9
👍🏾 1
y
Nice for android test users
The binary compatibility of the experimental overload of
runTest
is restored (#3673)
d
We've added a default timeout to
runTest
. Maybe your test takes longer than 10 seconds. Try passing some other timeout value to
runTest
, like
runTest(Duration.INFINITE) { }
, or
runTest(30.seconds) { }
, etc.
j
I will try, thanks! if it was the case I will report it, as a feedback, a better error message indicating we can change the timeout should be great
d
Maybe the tooling doesn't show it to you for some reason, or maybe you didn't notice it, but the error message is already there.
j
I have re-checked the stacktrace and I can't see it
Is it possible to change the timeout globally? Almost all tests I have there are property tests with kotest, so they run tons of tests
d
Seems like a tooling issue. Exceptions have some error messages, but I see none here.
Is it possible to change the timeout globally?
Not at the moment. You could do something like
fun runTestNoTimeout(block: suspend TestScope.() -> Unit): Unit = runTest(Duration.INFINITE, block)
and just use
runTestNoTimeout
throughout your codebase. If you don't like this solution, please file an issue at https://github.com/Kotlin/kotlinx.coroutines/issues with the feature request for a global setting.
j
Not sure if this can be handled in a different way by kotest tho, I will ask
j
how to know how long my tests are taking ? Because I have this same problem, but in my machine it runs in 3 seconds, do we have a way to detect that in the CI ?