From fdd672396bebc6e4bb17c8c2bc03d601b6f3ed71 Mon Sep 17 00:00:00 2001 From: Flavio Brasil Date: Thu, 16 Jan 2025 13:57:51 -0800 Subject: [PATCH] fix flaky test --- kyo-core/shared/src/test/scala/kyo/ClockTest.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kyo-core/shared/src/test/scala/kyo/ClockTest.scala b/kyo-core/shared/src/test/scala/kyo/ClockTest.scala index 9db4f55b8..e1e61ca4a 100644 --- a/kyo-core/shared/src/test/scala/kyo/ClockTest.scala +++ b/kyo-core/shared/src/test/scala/kyo/ClockTest.scala @@ -335,8 +335,8 @@ class ClockTest extends Test: instants <- Kyo.fill(10)(channel.take) _ <- task.interrupt _ <- Async.sleep(2.millis) - result <- channel.poll - yield assert(result.isEmpty) + _ <- untilTrue(channel.poll.map(_.isEmpty)) + yield succeed } "with time control" in runNotJS { Clock.withTimeControl { control =>