We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3eafa6f commit bb2a182Copy full SHA for bb2a182
twitter-futures/src/test/scala/com/dwolla/util/async/twitter/TwitterFutureAsyncMapKTests.scala
@@ -32,7 +32,11 @@ class TwitterFutureAsyncMapKTests extends CatsEffectSuite with ScalaCheckEffectS
32
test("cancelling a running Twitter Future lifted into IO should interrupt the underlying Twitter Future") {
33
for {
34
promise <- IO(Promise[Int]())
35
- fiber <- liftFuture[IO](IO.pure(promise)).start
+ startedLatch <- CountDownLatch[IO](1)
36
+ fiber <- IO.uncancelable { poll => // we only want the Future to be cancellable
37
+ poll(liftFuture[IO](startedLatch.release.as(promise))).start
38
+ }
39
+ _ <- startedLatch.await
40
_ <- fiber.cancel
41
} yield {
42
assert(promise.isInterrupted.isDefined)
0 commit comments