mirror of https://github.com/sbt/sbt.git
Merge pull request #4784 from eatkins/fix-scala-instance-test
Wait for akka termination in test
This commit is contained in:
commit
299bdcd372
|
|
@ -1,6 +1,8 @@
|
|||
package akka.actor
|
||||
|
||||
import org.junit._
|
||||
import scala.concurrent._
|
||||
import scala.concurrent.duration._
|
||||
|
||||
class BadTest {
|
||||
|
||||
|
|
@ -13,7 +15,7 @@ class BadTest {
|
|||
val system = ActorSystem()
|
||||
def evilGetThreadExectionContextName =
|
||||
system.asInstanceOf[ActorSystemImpl].internalCallingThreadExecutionContext.getClass.getName
|
||||
system.terminate()
|
||||
Await.result(system.terminate(), 5.seconds)
|
||||
val expected = "scala.concurrent.Future$InternalCallbackExecutor$"
|
||||
Assert.assertEquals("Failed to grab appropriate Akka name", expected, evilGetThreadExectionContextName)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue