Skip to content

Commit 67e21b2

Browse files
authored
Fix flaky SharingReferenceTest the same way it was addressed in Kotlin#2709 (Kotlin#3577)
1 parent e6ddc81 commit 67e21b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kotlinx-coroutines-core/jvm/test/flow/SharingReferenceTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class SharingReferenceTest : TestBase() {
5050

5151
@Test
5252
fun testStateInSuspendingReference() = runTest {
53-
val flow = weakEmitter.stateIn(GlobalScope)
53+
val flow = weakEmitter.stateIn(ContextScope(executor))
5454
linearize()
5555
FieldWalker.assertReachableCount(1, flow) { it === token }
5656
}

0 commit comments

Comments
 (0)