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 5
5
package kotlinx.coroutines
6
6
7
7
import kotlinx.coroutines.flow.*
8
+ import kotlinx.coroutines.internal.*
8
9
import kotlinx.coroutines.scheduling.*
9
10
import org.junit.*
10
11
import org.junit.Test
@@ -89,6 +90,7 @@ class RejectedExecutionTest : TestBase() {
89
90
90
91
@Test
91
92
fun testRejectOnDelay () = runTest {
93
+ if (! removeFutureOnCancel(executor)) return @runTest // Skip this test on old JDKs
92
94
expect(1 )
93
95
executor.acceptTasks = 1 // accept one task
94
96
assertFailsWith<CancellationException > {
@@ -110,6 +112,7 @@ class RejectedExecutionTest : TestBase() {
110
112
111
113
@Test
112
114
fun testRejectWithTimeout () = runTest {
115
+ if (! removeFutureOnCancel(executor)) return @runTest // Skip this test on old JDKs
113
116
expect(1 )
114
117
executor.acceptTasks = 1 // accept one task
115
118
assertFailsWith<CancellationException > {
You can’t perform that action at this time.
0 commit comments