Skip to content

Remove outdated ExperimentalTime annotation on TimeSource #4046

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion kotlinx-coroutines-core/jvm/test/flow/SharingStressTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
1 change: 0 additions & 1 deletion kotlinx-coroutines-test/common/src/TestScope.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ class TestCoroutineSchedulerTest {
}

@Test
@ExperimentalTime
fun testAdvanceTimeSource() = runTest {
val expected = 1.seconds
val before = testTimeSource.markNow()
Expand Down