Skip to content

Running epollcat IO test on Scalatest #78

Answered by armanbilge
fede0664 asked this question in Q&A
Discussion options

You must be logged in to vote

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 ExecutionContexts (even if it's the Scala global EC).

//> 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)
  }
}
$ scala-cli test bug.scala 
Bu…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@fede0664
Comment options

@armanbilge
Comment options

Answer selected by fede0664
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants