=rem #3566 Fix failing RemoteNodeRestartDeathWatchSpec

* Subject actor in freshSystem was not started when the "shutdown"
  message was sent. Solved by retry.
This commit is contained in:
Patrik Nordwall 2013-09-04 11:41:24 +02:00
parent 701321302c
commit 52f7d2d478
2 changed files with 8 additions and 3 deletions

View file

@ -78,7 +78,7 @@ object Props {
* {{{
* 'Props(new Actor with Stash { ... })
* }}}
* Instead you must create a named class that mixin the trait,
* Instead you must create a named class that mixin the trait,
* e.g. `class MyActor extends Actor with Stash`.
*/
def apply[T <: Actor: ClassTag](creator: T): Props =

View file

@ -82,8 +82,13 @@ abstract class RemoteNodeRestartDeathWatchSpec
expectTerminated(subject, 15.seconds)
system.actorSelection(RootActorPath(secondAddress) / "user" / "subject") ! "shutdown"
expectMsg("shutdown-ack")
within(5.seconds) {
// retry because the Subject actor might not be started yet
awaitAssert {
system.actorSelection(RootActorPath(secondAddress) / "user" / "subject") ! "shutdown"
expectMsg(1.second, "shutdown-ack")
}
}
}
runOn(second) {