File tree Expand file tree Collapse file tree
tests/shared/src/test/scala/cats/effect Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2247,19 +2247,19 @@ class IOSuite extends BaseScalaCheckSuite with DisciplineSuite with IOPlatformSu
22472247
22482248 real(" joinOrCancel - gets result" ) {
22492249 for {
2250- ready <- Deferred [IO , Unit ]
2250+ ioaReady <- Deferred [IO , Unit ]
2251+ fiberReady <- Deferred [IO , Unit ]
22512252 requested <- Deferred [IO , Boolean ]
2252- ioa <- (ready .complete(()) *> requested.get)
2253+ ioa <- (ioaReady .complete(()) *> requested.get)
22532254 .onCancelRequested(requested.complete(true ).void)
22542255 .onCancel(requested.complete(false ).void)
22552256 .uncancelable
22562257 .start
2257- fiber <- ioa
2258+ fiber <- (fiberReady.complete(()) *> ioa
22582259 .joinOrCancel
2259- .flatMap(_.fold(IO .pure(false ), _ => IO .pure(false ), identity))
2260- .uncancelable
2261- .start
2262- _ <- ready.get
2260+ .flatMap(_.fold(IO .pure(false ), _ => IO .pure(false ), identity))).uncancelable.start
2261+ _ <- ioaReady.get
2262+ _ <- fiberReady.get
22632263 _ <- fiber.cancel
22642264 fiberResult <- fiber.join.flatMap(_.fold(IO .pure(false ), _ => IO .pure(false ), identity))
22652265 requestedResult <- requested.get
You can’t perform that action at this time.
0 commit comments