Skip to content

Commit 873e9a0

Browse files
committed
More permissive CoroutineSchedulerStressTest to avoid fails on slow Windows agents
1 parent cbeef10 commit 873e9a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/kotlinx-coroutines-core/test/scheduling/CoroutineSchedulerStressTest.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ class CoroutineSchedulerStressTest : TestBase() {
9696

9797
finishLatch.await()
9898
val observed = observedThreads.size
99-
val slowMachineDelta = if (AVAILABLE_PROCESSORS > 2) 0 else 1
100-
assertTrue(AVAILABLE_PROCESSORS in (observed - 1)..observed + slowMachineDelta, "Observed $observed threads with $AVAILABLE_PROCESSORS available processors")
99+
// on slow machines not all threads can be observed
100+
assertTrue(observed in (AVAILABLE_PROCESSORS - 1)..(AVAILABLE_PROCESSORS + 1), "Observed $observed threads with $AVAILABLE_PROCESSORS available processors")
101101
validateResults()
102102
}
103103

0 commit comments

Comments
 (0)