You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Scala Native implementation doesn't support timeouts (due to limitations of the single-threaded runtime). And actually I suspect the JavaScript one is broken too with the default parasitic execution context.
However, it is possible to implement timeouts for Scala Native when also overriding the ExecutionContext with a more sophisticated runtime.
For example the QueueExecutorScheduler in Cats Effect Native supports timeouts. Since we are using the Cats Effect runtime in munit-cats-effect, I would like to be able to support test timeouts there by overriding waitForCompletion.
Of course we could solve this in userland by adding timeouts to the IO-transform in munit-cats-effect, but then it wouldn't work for non-IO-based tests that also happen to be running in a Cats Effect suite.
The text was updated successfully, but these errors were encountered:
This is used to support timeouts for tests.
munit/munit/shared/src/main/scala/munit/FunSuite.scala
Lines 49 to 51 in 166698e
The Scala Native implementation doesn't support timeouts (due to limitations of the single-threaded runtime). And actually I suspect the JavaScript one is broken too with the default parasitic execution context.
munit/munit/native/src/main/scala/munit/internal/PlatformCompat.scala
Lines 22 to 28 in 166698e
However, it is possible to implement timeouts for Scala Native when also overriding the
ExecutionContext
with a more sophisticated runtime.For example the
QueueExecutorScheduler
in Cats Effect Native supports timeouts. Since we are using the Cats Effect runtime in munit-cats-effect, I would like to be able to support test timeouts there by overridingwaitForCompletion
.Of course we could solve this in userland by adding timeouts to the
IO
-transform in munit-cats-effect, but then it wouldn't work for non-IO
-based tests that also happen to be running in a Cats Effect suite.The text was updated successfully, but these errors were encountered: