From 82107a8d86ae7cc895785aa16ef068ef71f74ccc Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Fri, 24 Jan 2014 12:24:10 +0100 Subject: [PATCH] =rem #2966 Harden RemoteNodeShutdownAndComesBackSpec --- .../akka/remote/RemoteNodeShutdownAndComesBackSpec.scala | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/akka-remote-tests/src/multi-jvm/scala/akka/remote/RemoteNodeShutdownAndComesBackSpec.scala b/akka-remote-tests/src/multi-jvm/scala/akka/remote/RemoteNodeShutdownAndComesBackSpec.scala index 325b24a1cc..c255d806ed 100644 --- a/akka-remote-tests/src/multi-jvm/scala/akka/remote/RemoteNodeShutdownAndComesBackSpec.scala +++ b/akka-remote-tests/src/multi-jvm/scala/akka/remote/RemoteNodeShutdownAndComesBackSpec.scala @@ -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).