From a8d99063df0dcc6afd7eb8bd4c2da4699eeff341 Mon Sep 17 00:00:00 2001 From: Vsevolod Tolstopyatov Date: Tue, 5 Apr 2022 16:00:23 +0300 Subject: [PATCH] Update Kotlin to 1.6.20 --- README.md | 6 +-- .../benchmarks/ParametrizedDispatcherBase.kt | 1 - gradle.properties | 2 +- .../jvm/test/DispatcherKeyTest.kt | 2 +- .../common/test/TestDispatchersTest.kt | 1 - .../js/test/FailingTests.kt | 37 ------------------- 6 files changed, 5 insertions(+), 44 deletions(-) delete mode 100644 kotlinx-coroutines-test/js/test/FailingTests.kt diff --git a/README.md b/README.md index 10910f9e22..9495af170c 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ And make sure that you use the latest Kotlin version: ```xml - 1.6.0 + 1.6.20 ``` @@ -110,10 +110,10 @@ And make sure that you use the latest Kotlin version: ```kotlin plugins { // For build.gradle.kts (Kotlin DSL) - kotlin("jvm") version "1.6.0" + kotlin("jvm") version "1.6.20" // For build.gradle (Groovy DSL) - id "org.jetbrains.kotlin.jvm" version "1.6.0" + id "org.jetbrains.kotlin.jvm" version "1.6.20" } ``` diff --git a/benchmarks/src/jmh/kotlin/benchmarks/ParametrizedDispatcherBase.kt b/benchmarks/src/jmh/kotlin/benchmarks/ParametrizedDispatcherBase.kt index 80e15a1b4f..ce64c6a49b 100644 --- a/benchmarks/src/jmh/kotlin/benchmarks/ParametrizedDispatcherBase.kt +++ b/benchmarks/src/jmh/kotlin/benchmarks/ParametrizedDispatcherBase.kt @@ -25,7 +25,6 @@ abstract class ParametrizedDispatcherBase : CoroutineScope { private var closeable: Closeable? = null @Setup - @UseExperimental(InternalCoroutinesApi::class) open fun setup() { coroutineContext = when { dispatcher == "fjp" -> ForkJoinPool.commonPool().asCoroutineDispatcher() diff --git a/gradle.properties b/gradle.properties index e91e8dadaa..8faae9eb68 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,7 +5,7 @@ # Kotlin version=1.6.1-SNAPSHOT group=org.jetbrains.kotlinx -kotlin_version=1.6.0 +kotlin_version=1.6.20 # Dependencies junit_version=4.12 diff --git a/kotlinx-coroutines-core/jvm/test/DispatcherKeyTest.kt b/kotlinx-coroutines-core/jvm/test/DispatcherKeyTest.kt index e2d8ffaa47..303e8cc8fe 100644 --- a/kotlinx-coroutines-core/jvm/test/DispatcherKeyTest.kt +++ b/kotlinx-coroutines-core/jvm/test/DispatcherKeyTest.kt @@ -8,7 +8,7 @@ import org.junit.Test import kotlin.coroutines.* import kotlin.test.* -@UseExperimental(ExperimentalStdlibApi::class) +@OptIn(ExperimentalStdlibApi::class) class DispatcherKeyTest : TestBase() { companion object CustomInterceptor : AbstractCoroutineContextElement(ContinuationInterceptor), diff --git a/kotlinx-coroutines-test/common/test/TestDispatchersTest.kt b/kotlinx-coroutines-test/common/test/TestDispatchersTest.kt index 66a6c24e8f..bcf016b3d3 100644 --- a/kotlinx-coroutines-test/common/test/TestDispatchersTest.kt +++ b/kotlinx-coroutines-test/common/test/TestDispatchersTest.kt @@ -23,7 +23,6 @@ class TestDispatchersTest: OrderedExecutionTestBase() { /** Tests that asynchronous execution of tests does not happen concurrently with [AfterTest]. */ @Test - @NoJs fun testMainMocking() = runTest { val mainAtStart = TestMainDispatcher.currentTestDispatcher assertNotNull(mainAtStart) diff --git a/kotlinx-coroutines-test/js/test/FailingTests.kt b/kotlinx-coroutines-test/js/test/FailingTests.kt deleted file mode 100644 index 4746a737fa..0000000000 --- a/kotlinx-coroutines-test/js/test/FailingTests.kt +++ /dev/null @@ -1,37 +0,0 @@ -package kotlinx.coroutines.test - -import kotlinx.coroutines.* -import kotlinx.coroutines.test.internal.* -import kotlin.test.* - -/** These are tests that we want to fail. They are here so that, when the issue is fixed, their failure indicates that - * everything is better now. */ -class FailingTests { - - private var tearDownEntered = false - - @BeforeTest - fun setUp() { - Dispatchers.setMain(StandardTestDispatcher()) - } - - @AfterTest - fun tearDown() { - Dispatchers.resetMain() - tearDownEntered = true - } - - /** [TestDispatchersTest.testMainMocking]. */ - @Test - fun testAfterTestIsConcurrent() = runTest { - try { - val mainAtStart = TestMainDispatcher.currentTestDispatcher ?: return@runTest - withContext(Dispatchers.Default) { - // context switch - } - assertNotSame(mainAtStart, TestMainDispatcher.currentTestDispatcher!!) - } finally { - assertTrue(tearDownEntered) - } - } -}