Skip to content

Commit

Permalink
Merge pull request akka#23490 from akka/wip-17314-RemoteRestartedQuar…
Browse files Browse the repository at this point in the history
…antinedSpec-patriknw

harden RemoteRestartedQuarantinedSpec, akka#17314
  • Loading branch information
patriknw authored Aug 8, 2017
2 parents 0bcf32f + 537d2c9 commit ad90e45
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit ad90e45

Please sign in to comment.