Wait on shutdown of extra actor systems in tests. See #3217

This commit is contained in:
Björn Antonsson 2013-05-02 17:12:36 +02:00
parent 3bc661bed6
commit e00ab533bb
84 changed files with 762 additions and 845 deletions

View file

@ -201,7 +201,7 @@ class RemotingSpec extends AkkaSpec(RemotingSpec.cfg) with ImplicitSender with D
val maxPayloadBytes = system.settings.config.getBytes("akka.remote.test.maximum-payload-bytes").toInt
override def afterTermination() {
remoteSystem.shutdown()
shutdown(remoteSystem)
AssociationRegistry.clear()
}
@ -258,8 +258,7 @@ class RemotingSpec extends AkkaSpec(RemotingSpec.cfg) with ImplicitSender with D
// then we shutdown all but one system to simulate broken connections
moreSystems foreach { sys
sys.shutdown()
sys.awaitTermination(5.seconds.dilated)
shutdown(sys)
}
1 to n foreach { x
@ -531,8 +530,7 @@ class RemotingSpec extends AkkaSpec(RemotingSpec.cfg) with ImplicitSender with D
expectMsg(3.seconds, ("pong", otherGuyRemoteTest))
}(otherSystem)
} finally {
otherSystem.shutdown()
otherSystem.awaitTermination(5.seconds.dilated)
shutdown(otherSystem)
}
}
}