Merge pull request #1395 from akka/wip-3217-remotedeathwatchspec-failure-ban
Wait on shutdown of extra actor systems in tests. #3217
This commit is contained in:
commit
ddade2c59e
84 changed files with 762 additions and 845 deletions
|
|
@ -267,7 +267,7 @@ class ActorDocSpec extends AkkaSpec(Map("akka.loglevel" -> "INFO")) {
|
|||
val system = ActorSystem("mySystem")
|
||||
val myActor = system.actorOf(Props[MyActor].withDispatcher("my-dispatcher"), "myactor2")
|
||||
//#system-actorOf
|
||||
system.shutdown()
|
||||
shutdown(system)
|
||||
}
|
||||
|
||||
"creating actor with IndirectActorProducer" in {
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ class RemoteDeploymentDocSpec extends AkkaSpec("""
|
|||
val other = ActorSystem("remote", system.settings.config)
|
||||
val address = other.asInstanceOf[ExtendedActorSystem].provider.getExternalAddressFor(Address("akka.tcp", "s", "host", 1)).get
|
||||
|
||||
override def afterTermination() { other.shutdown() }
|
||||
override def afterTermination() { shutdown(other) }
|
||||
|
||||
"demonstrate programmatic deployment" in {
|
||||
//#deploy
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ package docs.serialization {
|
|||
//#serialize-messages-config
|
||||
val a = ActorSystem("system", config)
|
||||
a.settings.SerializeAllMessages must be(true)
|
||||
a.shutdown()
|
||||
shutdown(a)
|
||||
}
|
||||
|
||||
"demonstrate configuration of serialize creators" in {
|
||||
|
|
@ -79,7 +79,7 @@ package docs.serialization {
|
|||
//#serialize-creators-config
|
||||
val a = ActorSystem("system", config)
|
||||
a.settings.SerializeAllCreators must be(true)
|
||||
a.shutdown()
|
||||
shutdown(a)
|
||||
}
|
||||
|
||||
"demonstrate configuration of serializers" in {
|
||||
|
|
@ -97,7 +97,7 @@ package docs.serialization {
|
|||
""")
|
||||
//#serialize-serializers-config
|
||||
val a = ActorSystem("system", config)
|
||||
a.shutdown()
|
||||
shutdown(a)
|
||||
}
|
||||
|
||||
"demonstrate configuration of serialization-bindings" in {
|
||||
|
|
@ -126,7 +126,7 @@ package docs.serialization {
|
|||
SerializationExtension(a).serializerFor(classOf[String]).getClass must equal(classOf[JavaSerializer])
|
||||
SerializationExtension(a).serializerFor(classOf[Customer]).getClass must equal(classOf[JavaSerializer])
|
||||
SerializationExtension(a).serializerFor(classOf[java.lang.Boolean]).getClass must equal(classOf[MyOwnSerializer])
|
||||
a.shutdown()
|
||||
shutdown(a)
|
||||
}
|
||||
|
||||
"demonstrate the programmatic API" in {
|
||||
|
|
@ -152,7 +152,7 @@ package docs.serialization {
|
|||
back must equal(original)
|
||||
|
||||
//#programmatic
|
||||
system.shutdown()
|
||||
shutdown(system)
|
||||
}
|
||||
|
||||
"demonstrate serialization of ActorRefs" in {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class MySpec(_system: ActorSystem) extends TestKit(_system) with ImplicitSender
|
|||
import MySpec._
|
||||
|
||||
override def afterAll {
|
||||
system.shutdown()
|
||||
TestKit.shutdownActorSystem(system)
|
||||
}
|
||||
|
||||
"An Echo actor" must {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ class TestKitUsageSpec
|
|||
system.actorOf(Props(classOf[SequencingActor], testActor, headList, tailList))
|
||||
|
||||
override def afterAll {
|
||||
system.shutdown()
|
||||
shutdown(system)
|
||||
}
|
||||
|
||||
"An EchoActor" should {
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ class TestkitDocSpec extends AkkaSpec with DefaultTimeout with ImplicitSender {
|
|||
actor ! Kill
|
||||
}
|
||||
} finally {
|
||||
system.shutdown()
|
||||
shutdown(system)
|
||||
}
|
||||
//#event-filter
|
||||
}
|
||||
|
|
@ -282,7 +282,7 @@ class TestkitDocSpec extends AkkaSpec with DefaultTimeout with ImplicitSender {
|
|||
try expectMsg("hello") catch { case NonFatal(e) ⇒ system.shutdown(); throw e }
|
||||
//#put-your-test-code-here
|
||||
|
||||
system.shutdown()
|
||||
shutdown(system)
|
||||
}
|
||||
//#test-kit-base
|
||||
}
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ class TransactorDocSpec extends AkkaSpec {
|
|||
|
||||
count must be === 1
|
||||
|
||||
system.shutdown()
|
||||
shutdown(system)
|
||||
}
|
||||
|
||||
"coordinated api" in {
|
||||
|
|
@ -191,7 +191,7 @@ class TransactorDocSpec extends AkkaSpec {
|
|||
|
||||
coordinated.await()
|
||||
|
||||
system.shutdown()
|
||||
shutdown(system)
|
||||
}
|
||||
|
||||
"counter transactor" in {
|
||||
|
|
@ -208,7 +208,7 @@ class TransactorDocSpec extends AkkaSpec {
|
|||
|
||||
underlyingCounter.count.single.get must be === 1
|
||||
|
||||
system.shutdown()
|
||||
shutdown(system)
|
||||
}
|
||||
|
||||
"friendly counter transactor" in {
|
||||
|
|
@ -229,6 +229,6 @@ class TransactorDocSpec extends AkkaSpec {
|
|||
underlyingFriendlyCounter.count.single.get must be === 1
|
||||
underlyingFriend.count.single.get must be === 1
|
||||
|
||||
system.shutdown()
|
||||
shutdown(system)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue