From 537d2c96fec2dc76d70c374f4bc323dc362c7e57 Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Tue, 8 Aug 2017 14:31:31 +0200 Subject: [PATCH] harden RemoteRestartedQuarantinedSpec, #17314 * Seems like the initial message may be dropped in this case, we are at-most once after all. See detailed logs in issue. --- .../akka/remote/RemoteRestartedQuarantinedSpec.scala | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/akka-remote-tests/src/multi-jvm/scala/akka/remote/RemoteRestartedQuarantinedSpec.scala b/akka-remote-tests/src/multi-jvm/scala/akka/remote/RemoteRestartedQuarantinedSpec.scala index 59b2e19778..3e503490d8 100644 --- a/akka-remote-tests/src/multi-jvm/scala/akka/remote/RemoteRestartedQuarantinedSpec.scala +++ b/akka-remote-tests/src/multi-jvm/scala/akka/remote/RemoteRestartedQuarantinedSpec.scala @@ -130,13 +130,13 @@ abstract class RemoteRestartedQuarantinedSpec } """).withFallback(system.settings.config)) + // retry because it's possible to loose the initial message here, see issue #17314 val probe = TestProbe()(freshSystem) - - freshSystem.actorSelection(RootActorPath(firstAddress) / "user" / "subject").tell(Identify("subject"), probe.ref) - // TODO sometimes it takes long time until the new connection is established, - // It seems like there must first be a transport failure detector timeout, that triggers - // "No response from remote. Handshake timed out or transport failure detector triggered". - probe.expectMsgType[ActorIdentity](30.second).ref should not be (None) + probe.awaitAssert({ + println(s"# --") // FIXME + freshSystem.actorSelection(RootActorPath(firstAddress) / "user" / "subject").tell(Identify("subject"), probe.ref) + probe.expectMsgType[ActorIdentity](1.second).ref should not be (None) + }, 30.seconds) // Now the other system will be able to pass, too freshSystem.actorOf(Props[Subject], "subject")