https://kotlinlang.org logo
Title
d

Dmitry Khalanskiy [JB]

05/12/2023, 3:56 PM
📣 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
y

yschimke

05/12/2023, 4:13 PM
Nice for android test users
The binary compatibility of the experimental overload of
runTest
is restored (#3673)
j

Javier

05/15/2023, 10:44 AM
I am getting
kotlinx.coroutines.test.UncompletedCoroutinesError at null:-1
but only on linux x64 after upgrading to 1.7.1. Is anyone seeing it too?
d

Dmitry Khalanskiy [JB]

05/15/2023, 10:48 AM
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

Javier

05/15/2023, 12:32 PM
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

Dmitry Khalanskiy [JB]

05/15/2023, 12:35 PM
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

Javier

05/15/2023, 12:42 PM
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

Dmitry Khalanskiy [JB]

05/15/2023, 12:47 PM
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

Javier

05/15/2023, 12:48 PM
Not sure if this can be handled in a different way by kotest tho, I will ask