Skip to content

Commit

Permalink
Make sure test runs without racing on same sleep time
Browse files Browse the repository at this point in the history
  • Loading branch information
natsukagami committed Dec 10, 2023
1 parent 21aa64e commit 59c518f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions shared/src/test/scala/FutureBehavior.scala
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,12 @@ class FutureBehavior extends munit.FunSuite {
var touched = false
val fut = Future:
Future:
sleep(2000)
sleep(1000)
touched = true
sleep(500)
10
assertEquals(fut.await, 10)
sleep(2000)
sleep(1000)
assertEquals(touched, false)
}

Expand Down

0 comments on commit 59c518f

Please sign in to comment.