Skip to content

Commit

Permalink
Make the tests deterministic
Browse files Browse the repository at this point in the history
  • Loading branch information
djspiewak committed Mar 14, 2022
1 parent 1b503ee commit 3f1dfb5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/shared/src/test/scala/cats/effect/IOSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ class IOSpec extends BaseSpec with Discipline with IOPlatformSpecification {
def execute(r: Runnable) = ec.execute(r)
}

IO.raiseError(TestException).start.evalOn(ec2) *> IO(ts)
IO.raiseError(TestException).start.evalOn(ec2) *> IO.sleep(10.millis) *> IO(ts)
}
}

Expand All @@ -227,7 +227,7 @@ class IOSpec extends BaseSpec with Discipline with IOPlatformSpecification {
}

for {
f <- IO.raiseError(TestException).start.evalOn(ec2)
f <- (IO.sleep(10.millis) *> IO.raiseError(TestException)).start.evalOn(ec2)
_ <- f.join
back <- IO(ts)
} yield back
Expand Down

0 comments on commit 3f1dfb5

Please sign in to comment.