Running epollcat IO test on Scalatest #78
-
Running the following test on Scalatest 3.2.14: class TestIO extends AsyncFunSuite with Matchers {
implicit val globalRT:IORuntime = epollcat.unsafe.EpollRuntime.global
override val executionContext = globalRT.compute
test("IO to Future") {
val t = IO(true shouldBe true)
t.unsafeToFuture()
}
} The test itself runs successfully:
But, as the the [error] lines show, Scalatest fails, reporting this exception on test-reports:
Any suggestion on how to test an epollcat based IO on Scalatest? |
Beta Was this translation helpful? Give feedback.
Answered by
armanbilge
Oct 27, 2022
Replies: 1 comment 2 replies
-
Thanks for the report. I am not very familiar with Scalatest, but this is not an issue specific to epollcat. For example this also fails with the same error. This suggests that Scalatest native is unable to support custom //> using lib "org.scalatest::scalatest::3.2.14"
//> using platform "native"
import org.scalatest.funsuite._
import org.scalatest.matchers.should._
import scala.concurrent.{ExecutionContext, Future}
class Bugged extends AsyncFunSuite with Matchers {
override val executionContext = ExecutionContext.global
test("just a future") {
Future(true shouldBe true)(executionContext)
}
}
|
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
fede0664
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks for the report. I am not very familiar with Scalatest, but this is not an issue specific to epollcat. For example this also fails with the same error. This suggests that Scalatest native is unable to support custom
ExecutionContext
s (even if it's the Scala global EC).