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).