Skip to content

Commit e0cf96d

Browse files
committed
Remove flaky check from StateFlowStressTest.
There's no guarantee that any particular collector will ever encounter a value emitted by a particular emitter. It's entirely possible for the value to be overwritten by a different emitter before the collector gets a chance to collect it. It's very, very unlikely for a collector to miss the second half of all values emitted by a particular emitter, but it is possible to happen and this causes the test to be flaky.
1 parent ca8a3da commit e0cf96d

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,6 @@ class StateFlowStressTest : TestBase() {
6363
}
6464
emitters.cancelAndJoin()
6565
collectors.cancelAndJoin()
66-
// make sure nothing hanged up
67-
require(collected.all { c ->
68-
c.withIndex().all { (emitter, current) -> current > emitted[emitter] / 2 }
69-
})
7066
}
7167

7268
@Test

0 commit comments

Comments
 (0)