File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
kotlinx-coroutines-core/jvm/test Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 55package kotlinx.coroutines
66
77import kotlinx.coroutines.flow.*
8+ import kotlinx.coroutines.internal.*
89import kotlinx.coroutines.scheduling.*
910import org.junit.*
1011import org.junit.Test
@@ -89,6 +90,7 @@ class RejectedExecutionTest : TestBase() {
8990
9091 @Test
9192 fun testRejectOnDelay () = runTest {
93+ if (! removeFutureOnCancel(executor)) return @runTest // Skip this test on old JDKs
9294 expect(1 )
9395 executor.acceptTasks = 1 // accept one task
9496 assertFailsWith<CancellationException > {
@@ -110,6 +112,7 @@ class RejectedExecutionTest : TestBase() {
110112
111113 @Test
112114 fun testRejectWithTimeout () = runTest {
115+ if (! removeFutureOnCancel(executor)) return @runTest // Skip this test on old JDKs
113116 expect(1 )
114117 executor.acceptTasks = 1 // accept one task
115118 assertFailsWith<CancellationException > {
You can’t perform that action at this time.
0 commit comments