Cleanup scripted tests

The sleeps in source-dependencies/export-jars are no longer necessary
and just slow the test down. I also fixed minor syntax issues in
scala-instance-classloader and fixed a thread leak in the test.
This commit is contained in:
Ethan Atkins 2018-12-03 15:02:50 -08:00
parent ef08290ecc
commit 2e40b52e7c
2 changed files with 1 additions and 6 deletions

View File

@ -5,11 +5,9 @@ $ copy-file changes/A1.scala a/A.scala
$ copy-file changes/A2.scala a/A.scala
# done this way because last modified times often have ~1s resolution
$ sleep 2000
> run 2
$ copy-file changes/A3.scala a/A.scala
$ sleep 2000
> run 3
$ copy-file changes/build2.sbt build2.sbt
@ -19,9 +17,7 @@ $ copy-file changes/A1.scala a/A.scala
> run 1
$ copy-file changes/A2.scala a/A.scala
$ sleep 2000
> run 2
$ copy-file changes/A3.scala a/A.scala
$ sleep 2000
> run 3

View File

@ -10,11 +10,10 @@ class BadTest {
// * Load something from our own classloader that's INSIDE the scala library
// * Try to load that same something from the THREAD CONTEXT classloader.
// * Ensure we can do both, i.e. the second used to be filtered and broken.
val current = Thread.currentThread.getContextClassLoader
val mine = this.getClass.getClassLoader
val system = ActorSystem()
def evilGetThreadExectionContextName =
system.asInstanceOf[ActorSystemImpl].internalCallingThreadExecutionContext.getClass.getName
system.terminate()
val expected = "scala.concurrent.Future$InternalCallbackExecutor$"
Assert.assertEquals("Failed to grab appropriate Akka name", expected, evilGetThreadExectionContextName)
}