=rem #2966 Harden RemoteNodeShutdownAndComesBackSpec

This commit is contained in:
Patrik Nordwall 2014-01-24 12:24:10 +01:00
parent 2416be7836
commit 82107a8d86

View file

@ -100,13 +100,16 @@ abstract class RemoteNodeShutdownAndComesBackSpec
within(30.seconds) {
// retry because the Subject actor might not be started yet
awaitAssert {
system.actorSelection(RootActorPath(secondAddress) / "user" / "subject") ! Identify("subject")
expectMsgPF(1 second) {
val p = TestProbe()
system.actorSelection(RootActorPath(secondAddress) / "user" / "subject").tell(Identify("subject"), p.ref)
p.expectMsgPF(1 second) {
case ActorIdentity("subject", Some(ref)) true
}
}
}
expectTerminated(subject)
// Establish watch with the new system. This triggers additional system message traffic. If buffers are out
// of synch the remote system will be quarantined and the rest of the test will fail (or even in earlier
// stages depending on circumstances).