mirror of https://github.com/sbt/sbt.git
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:
parent
ef08290ecc
commit
2e40b52e7c
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue