=rem #17440 Harden RemoteReDeploymentSpec
This commit is contained in:
parent
62f5f869a1
commit
bd280e3252
1 changed files with 12 additions and 7 deletions
|
|
@ -1,3 +1,6 @@
|
|||
/**
|
||||
* Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com>
|
||||
*/
|
||||
package akka.remote
|
||||
|
||||
import akka.remote.testkit.MultiNodeConfig
|
||||
|
|
@ -97,15 +100,15 @@ abstract class RemoteReDeploymentMultiJvmSpec extends MultiNodeSpec(RemoteReDepl
|
|||
"terminate the child when its parent system is replaced by a new one" in {
|
||||
|
||||
val echo = system.actorOf(echoProps(testActor), "echo")
|
||||
val address = node(second).address
|
||||
enterBarrier("echo-started")
|
||||
|
||||
runOn(second) {
|
||||
system.actorOf(Props[Parent], "parent") ! ((Props[Hello], "hello"))
|
||||
expectMsg("HelloParent")
|
||||
expectMsg(15.seconds, "HelloParent")
|
||||
}
|
||||
|
||||
runOn(first) {
|
||||
expectMsg("PreStart")
|
||||
expectMsg(15.seconds, "PreStart")
|
||||
}
|
||||
|
||||
enterBarrier("first-deployed")
|
||||
|
|
@ -136,14 +139,16 @@ abstract class RemoteReDeploymentMultiJvmSpec extends MultiNodeSpec(RemoteReDepl
|
|||
val p = TestProbe()(sys)
|
||||
sys.actorOf(echoProps(p.ref), "echo")
|
||||
p.send(sys.actorOf(Props[Parent], "parent"), (Props[Hello], "hello"))
|
||||
p.expectMsg("HelloParent")
|
||||
p.expectMsg(15.seconds, "HelloParent")
|
||||
}
|
||||
|
||||
enterBarrier("re-deployed")
|
||||
|
||||
runOn(first) {
|
||||
if (expectQuarantine) expectMsg("PreStart")
|
||||
else expectMsgAllOf("PostStop", "PreStart")
|
||||
within(15.seconds) {
|
||||
if (expectQuarantine) expectMsg("PreStart")
|
||||
else expectMsgAllOf("PostStop", "PreStart")
|
||||
}
|
||||
}
|
||||
|
||||
enterBarrier("the-end")
|
||||
|
|
@ -154,4 +159,4 @@ abstract class RemoteReDeploymentMultiJvmSpec extends MultiNodeSpec(RemoteReDepl
|
|||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue