Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions kotlinx-coroutines-core/jvm/test/JobChildStressTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,14 @@ class JobChildStressTest : TestBase() {
launch(pool + deferred) {
deferred.complete(Unit) // Transition deferred into "completing" state waiting for current child
// **Asynchronously** submit task that launches a child so it races with completion
pool.executor.execute {
rogueJob.set(launch(pool + deferred) {
throw TestException("isCancelled: ${coroutineContext.job.isCancelled}")
})
try {
pool.executor.execute {
rogueJob.set(launch(pool + deferred) {
throw TestException("isCancelled: ${coroutineContext.job.isCancelled}")
})
}
} catch (_: RejectedExecutionException) {
// This is expected if the pool is closed
}
}

Expand Down