admin管理员组文章数量:1122832
I have some basic tests that i am executing with scala cli. When i run the tests scala-cli test core
where core is the name of the directory where the tests are. the test run is finished but the process doesnt end. It just hangs there and even if i run it in debug mode i dont see what it is hanging on.
I was using the munit framework and i saw the this behavior but intermittently and then i switched to scalatest just to try and it happens all the time.
I had tests that tested futures and i thought that that might br the problem so i just had them run assert(true)
just to see if i could isolte the problem.
When running with munit it seems to exit properly for some async tests but not for others. It seems to consistently exit when the tests are not async
Scalatest wont exit at all no matter if the tests are async or not
Has anyone else run into this?
=== edit === an example scalatest async test is
import org.scalatest.funspec.{AsyncFunSpec, AsyncFunSpecLike}
import org.scalatest.funsuite.AsyncFunSuite
class SlackAPITest extends AsyncFunSuite {
implicit val ec: scala.concurrent.ExecutionContext = scala.concurrent.ExecutionContext.global
test("post message") {
postMessage("whatever :chococat: :catbus: :catbus2:", testChannelId)
}
}
where the postMessage method returns a Future[String]
本文标签: scalatestScalacli test doesnt exit after test runStack Overflow
版权声明:本文标题:scalatest - Scala-cli test doesnt exit after test run - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736395594a1944312.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论