From efd0c23c30b2e7c0c3161f74b4ae931a2216ff58 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Sat, 23 Sep 2023 16:27:25 +0000 Subject: [PATCH] Replicate https://github.com/typelevel/cats-effect/issues/3776 --- .../src/test/scala/cats/effect/std/DispatcherSpec.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/shared/src/test/scala/cats/effect/std/DispatcherSpec.scala b/tests/shared/src/test/scala/cats/effect/std/DispatcherSpec.scala index ea27049c25..4c24f7416d 100644 --- a/tests/shared/src/test/scala/cats/effect/std/DispatcherSpec.scala +++ b/tests/shared/src/test/scala/cats/effect/std/DispatcherSpec.scala @@ -251,11 +251,11 @@ class DispatcherSpec extends BaseSpec with DetectPlatform { } "raise an error on leaked runner" in real { - dispatcher.use(IO.pure(_)) flatMap { runner => + dispatcher.use(IO.pure(_)).flatMap { runner => IO { runner.unsafeRunAndForget(IO(ko)) must throwAn[IllegalStateException] } - } + }.replicateA_(10000).as(ok) } "report exception if raised during unsafeRunAndForget" in real {