Skip to content

Commit 0dd30f9

Browse files
committed
Added some extra test comments
1 parent 64c552d commit 0dd30f9

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

tests/jvm/src/test/scala/cats/effect/IOPlatformSpecification.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ trait IOPlatformSpecification { self: BaseSpec with ScalaCheck =>
348348
implicit val runtime: IORuntime = IORuntime.builder().setCompute(pool, shutdown).build()
349349

350350
try {
351+
// longer sleep all-but guarantees this timer is fired *after* the worker is parked
351352
val test = IO.sleep(500.millis) *> IO.pure(true)
352353
test.unsafeRunTimed(5.seconds) must beSome(true)
353354
} finally {
@@ -362,6 +363,7 @@ trait IOPlatformSpecification { self: BaseSpec with ScalaCheck =>
362363
implicit val runtime: IORuntime = IORuntime.builder().setCompute(pool, shutdown).build()
363364

364365
try {
366+
// shorter sleep makes it more likely this timer fires *before* the worker is parked
365367
val test = IO.sleep(1.milli) *> IO.pure(true)
366368
test.unsafeRunTimed(1.second) must beSome(true)
367369
} finally {

0 commit comments

Comments
 (0)