Skip to content

Commit

Permalink
More permissive CoroutineSchedulerStressTest to avoid fails on slow W…
Browse files Browse the repository at this point in the history
…indows agents
  • Loading branch information
elizarov committed Sep 27, 2018
1 parent cbeef10 commit 873e9a0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ class CoroutineSchedulerStressTest : TestBase() {

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

Expand Down

0 comments on commit 873e9a0

Please sign in to comment.