Merge pull request #1404 from akka/wip-3311-localactorrefproviderspec-failure-ban

Actor fields are cleared after Terminated is sent #3311
This commit is contained in:
Björn Antonsson 2013-05-07 03:32:51 -07:00
commit 14faef8355

View file

@ -70,9 +70,13 @@ class LocalActorRefProviderSpec extends AkkaSpec(LocalActorRefProviderSpec.confi
childProps1 must be(Props.empty)
system stop a
expectTerminated(a)
val childProps2 = child.asInstanceOf[LocalActorRef].underlying.props
childProps2 must not be theSameInstanceAs(childProps1)
childProps2 must be theSameInstanceAs ActorCell.terminatedProps
// the fields are cleared after the Terminated message has been sent,
// so we need to check for a reasonable time after we receive it
awaitAssert({
val childProps2 = child.asInstanceOf[LocalActorRef].underlying.props
childProps2 must not be theSameInstanceAs(childProps1)
childProps2 must be theSameInstanceAs ActorCell.terminatedProps
}, 1 second)
}
}