From 2917e66e77d4c6baadaed0adb95b116c859e4174 Mon Sep 17 00:00:00 2001 From: Philip Wedemann <22521688+hfhbd@users.noreply.github.com> Date: Sun, 18 Feb 2024 21:40:30 +0000 Subject: [PATCH] Remove outdated ExperimentalTime annotation --- kotlinx-coroutines-core/jvm/test/flow/SharingStressTest.kt | 1 - kotlinx-coroutines-test/common/src/TestCoroutineScheduler.kt | 1 - kotlinx-coroutines-test/common/src/TestScope.kt | 1 - .../common/test/TestCoroutineSchedulerTest.kt | 1 - 4 files changed, 4 deletions(-) diff --git a/kotlinx-coroutines-core/jvm/test/flow/SharingStressTest.kt b/kotlinx-coroutines-core/jvm/test/flow/SharingStressTest.kt index 7a524853eb..0d160e6a70 100644 --- a/kotlinx-coroutines-core/jvm/test/flow/SharingStressTest.kt +++ b/kotlinx-coroutines-core/jvm/test/flow/SharingStressTest.kt @@ -11,7 +11,6 @@ import kotlin.test.* import kotlin.time.* import kotlin.time.TimeSource -@OptIn(ExperimentalTime::class) class SharingStressTest : TestBase() { private val testDuration = 1000L * stressTestMultiplier private val nSubscribers = 5 diff --git a/kotlinx-coroutines-test/common/src/TestCoroutineScheduler.kt b/kotlinx-coroutines-test/common/src/TestCoroutineScheduler.kt index ba46d17c4b..8c70fa8e05 100644 --- a/kotlinx-coroutines-test/common/src/TestCoroutineScheduler.kt +++ b/kotlinx-coroutines-test/common/src/TestCoroutineScheduler.kt @@ -219,7 +219,6 @@ public class TestCoroutineScheduler : AbstractCoroutineContextElement(TestCorout /** * Returns the [TimeSource] representation of the virtual time of this scheduler. */ - @ExperimentalTime public val timeSource: TimeSource.WithComparableMarks = object : AbstractLongTimeSource(DurationUnit.MILLISECONDS) { override fun read(): Long = currentTime } diff --git a/kotlinx-coroutines-test/common/src/TestScope.kt b/kotlinx-coroutines-test/common/src/TestScope.kt index f6e69510a7..180e76de21 100644 --- a/kotlinx-coroutines-test/common/src/TestScope.kt +++ b/kotlinx-coroutines-test/common/src/TestScope.kt @@ -131,7 +131,6 @@ public fun TestScope.advanceTimeBy(delayTime: Duration): Unit = testScheduler.ad * @see TestCoroutineScheduler.timeSource */ @ExperimentalCoroutinesApi -@ExperimentalTime public val TestScope.testTimeSource: TimeSource.WithComparableMarks get() = testScheduler.timeSource /** diff --git a/kotlinx-coroutines-test/common/test/TestCoroutineSchedulerTest.kt b/kotlinx-coroutines-test/common/test/TestCoroutineSchedulerTest.kt index ba539696d1..a7dd8c623f 100644 --- a/kotlinx-coroutines-test/common/test/TestCoroutineSchedulerTest.kt +++ b/kotlinx-coroutines-test/common/test/TestCoroutineSchedulerTest.kt @@ -310,7 +310,6 @@ class TestCoroutineSchedulerTest { } @Test - @ExperimentalTime fun testAdvanceTimeSource() = runTest { val expected = 1.seconds val before = testTimeSource.markNow()