Add scripted test for closing classloaders

https://github.com/sbt/sbt/issues/5075 reports that sbt 1.3.0 has a
regression for in process run. In sbt 1.3.0, we close the classloader
that invokes the main method before all of the daemon threads complete.
This adds a scripted test that fails due to this regression.
This commit is contained in:
Ethan Atkins 2019-09-14 14:25:45 -07:00
parent 5e44479dfb
commit c4045e7575
2 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,10 @@
object Main extends App {
class Foo
new Thread {
override def run(): Unit = {
Thread.sleep(500)
try new Foo
catch { case t: Throwable => sys.exit(1) }
}
}.start()
}

View File

@ -0,0 +1 @@
> run