From bab371b7749883d68514b3d69aa2f08a063cdafd Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Tue, 5 Sep 2023 14:35:06 +0000 Subject: [PATCH] Fix https://github.com/scalameta/munit/issues/692 --- .../native/src/main/scala/munit/internal/PlatformCompat.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/munit/native/src/main/scala/munit/internal/PlatformCompat.scala b/munit/native/src/main/scala/munit/internal/PlatformCompat.scala index a4ab1294..79112d82 100644 --- a/munit/native/src/main/scala/munit/internal/PlatformCompat.scala +++ b/munit/native/src/main/scala/munit/internal/PlatformCompat.scala @@ -24,7 +24,9 @@ object PlatformCompat { duration: Duration, ec: ExecutionContext ): Future[T] = { - startFuture() + val f = startFuture() + scala.scalanative.runtime.loop() + f } def setTimeout(ms: Int)(body: => Unit): () => Unit = { Thread.sleep(ms)