wvlet / airframe

Essential Building Blocks for Scala
https://wvlet.org/airframe
Apache License 2.0
631 stars 65 forks source link

scala-cli: AirSpec test hungs after completion #3049

Closed xerial closed 1 year ago

xerial commented 1 year ago

When using AirSpec with scala-cli, the process hungs:

Build.test.scala

//> using test.dep org.wvlet.airframe::airspec:23.7.0
//> using testFramework "wvlet.airspec.Framework"
import wvlet.airspec.AirSpec

class BuildTest extends AirSpec:
  test("foo") {
    // TODO: hangs after completion
  }
$ scala-cli test .
Compiling project (test, Scala 3.3.0, JVM)
Compiled project (test, Scala 3.3.0, JVM)
BuildTest:
 - foo 6.82ms <----------- hungs here 

Probably because async test support of AirSpec is related.

xerial commented 1 year ago

It looks like thread manager is not closed after test completion: https://github.com/wvlet/airframe/blob/c9352ab76ceec7da1898e5eb453ac706a556bf99/airspec/.jvm/src/main/scala/wvlet/airspec/Compat.scala#L35

xerial commented 1 year ago

Fixed in airspec 23.7.1