We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CoroutinesTimeout rule doesn't capture some coroutines started during a test since the coroutines dump magic installation is too late.
Running the following test (should always fail with timeout) produces coroutines dump with only "job2" and no "job1".
import kotlinx.coroutines.* import kotlinx.coroutines.debug.junit4.* import org.junit.* class DumpTest { @get:Rule val timeout: CoroutinesTimeout = CoroutinesTimeout.seconds(1) private val coroutine = GlobalScope.launch(CoroutineName("job1")) { coroutineContext[Job]!!.join() // hang forever } @Test fun test(): Unit = runBlocking(CoroutineName("job2")) { coroutine.join() } }
The text was updated successfully, but these errors were encountered:
Install debug probes in CoroutinesTimeout constructor to capture coro…
4d070ee
…utines launched from within a test constructor Fixes #1542
fcc004c
qwwdfsad
No branches or pull requests
CoroutinesTimeout rule doesn't capture some coroutines started during a test since the coroutines dump magic installation is too late.
Running the following test (should always fail with timeout) produces coroutines dump with only "job2" and no "job1".
The text was updated successfully, but these errors were encountered: