aboutsummaryrefslogtreecommitdiffstats
path: root/kotlinx-coroutines-core/jvm
diff options
context:
space:
mode:
authorRoman Elizarov <elizarov@gmail.com>2020-10-13 18:46:18 +0300
committerRoman Elizarov <elizarov@gmail.com>2020-10-13 18:46:27 +0300
commit863258b613d61435b0ac07b709661fe9fd33177f (patch)
tree8c6979d718ab990fec3c14b124746438e4e75057 /kotlinx-coroutines-core/jvm
parent1b34e1c7dd6207d7683c307bae0b934a3dc18d09 (diff)
downloadplatform_external_kotlinx.coroutines-863258b613d61435b0ac07b709661fe9fd33177f.tar.gz
platform_external_kotlinx.coroutines-863258b613d61435b0ac07b709661fe9fd33177f.tar.bz2
platform_external_kotlinx.coroutines-863258b613d61435b0ac07b709661fe9fd33177f.zip
Fixed RejectedExecutionTest on JDK1.6
Diffstat (limited to 'kotlinx-coroutines-core/jvm')
-rw-r--r--kotlinx-coroutines-core/jvm/test/RejectedExecutionTest.kt3
1 files changed, 3 insertions, 0 deletions
diff --git a/kotlinx-coroutines-core/jvm/test/RejectedExecutionTest.kt b/kotlinx-coroutines-core/jvm/test/RejectedExecutionTest.kt
index a6f4dd6b..7f6d6b66 100644
--- a/kotlinx-coroutines-core/jvm/test/RejectedExecutionTest.kt
+++ b/kotlinx-coroutines-core/jvm/test/RejectedExecutionTest.kt
@@ -5,6 +5,7 @@
package kotlinx.coroutines
import kotlinx.coroutines.flow.*
+import kotlinx.coroutines.internal.*
import kotlinx.coroutines.scheduling.*
import org.junit.*
import org.junit.Test
@@ -89,6 +90,7 @@ class RejectedExecutionTest : TestBase() {
@Test
fun testRejectOnDelay() = runTest {
+ if (!removeFutureOnCancel(executor)) return@runTest // Skip this test on old JDKs
expect(1)
executor.acceptTasks = 1 // accept one task
assertFailsWith<CancellationException> {
@@ -110,6 +112,7 @@ class RejectedExecutionTest : TestBase() {
@Test
fun testRejectWithTimeout() = runTest {
+ if (!removeFutureOnCancel(executor)) return@runTest // Skip this test on old JDKs
expect(1)
executor.acceptTasks = 1 // accept one task
assertFailsWith<CancellationException> {