File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
core/shared/src/test/scala/fs2 Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -208,13 +208,15 @@ class ParEvalMapSuite extends Fs2Suite {
208
208
}
209
209
210
210
def check (pipe : Pipe [IO , IO [Unit ], Unit ]) =
211
- IO .deferred[Unit ]
212
- .flatMap { d =>
213
- val cancelled = IO .never.onCancel(d.complete(()).void)
214
- val stream = Stream (u, cancelled).covary[IO ]
211
+ (CountDownLatch [IO ](2 ), IO .deferred[Unit ])
212
+ .mapN { case (latch, d) =>
213
+ val w = latch.release *> latch.await
214
+ val cancelled = IO .uncancelable(poll => w *> poll(IO .never).onCancel(d.complete(()).void))
215
+ val stream = Stream (w *> u, cancelled).covary[IO ]
215
216
val action = stream.through(pipe).take(1 ).compile.drain
216
217
action *> d.get
217
218
}
219
+ .flatten
218
220
.assertEquals(())
219
221
}
220
222
You can’t perform that action at this time.
0 commit comments