Removing preStart invocation for each restart

This commit is contained in:
Viktor Klang 2011-09-05 17:29:30 +02:00
parent b6709175b6
commit 93786a31fa
2 changed files with 0 additions and 5 deletions

View file

@ -100,7 +100,6 @@ class ActorRestartSpec extends WordSpec with MustMatchers with TestKit with Befo
actor ! Kill
within(1 second) {
expectMsg(("preRestart", Some(Kill), 1))
expectMsg(("preStart", 2))
expectMsg(("postRestart", 2))
expectNoMsg
}
@ -121,7 +120,6 @@ class ActorRestartSpec extends WordSpec with MustMatchers with TestKit with Befo
tRef.underlyingActor must be(tActor)
expectMsg((tActor, tRef))
tRef.stop()
expectMsg(("preStart", 2))
expectMsg(("postRestart", 2))
expectNoMsg
}
@ -139,7 +137,6 @@ class ActorRestartSpec extends WordSpec with MustMatchers with TestKit with Befo
actor ! Kill
within(1 second) {
expectMsg(("preRestart", Some(Kill), 1))
expectMsg(("preStart", 2))
expectMsg(("postRestart", 2))
expectNoMsg
}
@ -159,7 +156,6 @@ class ActorRestartSpec extends WordSpec with MustMatchers with TestKit with Befo
actor ! Kill
within(1 second) {
expectMsg(("preRestart", Some(Kill), 1))
expectMsg(("preStart", 2))
expectMsg(("postRestart", 2))
expectNoMsg
}

View file

@ -848,7 +848,6 @@ class LocalActorRef private[akka] (private[this] val props: Props, val address:
val freshActor = newActor
setActorSelfFields(failedActor, null) // Only null out the references if we could instantiate the new actor
actorInstance.set(freshActor) // Assign it here so if preStart fails, we can null out the sef-refs next call
freshActor.preStart()
freshActor.postRestart(reason)
if (Actor.debugLifecycle) EventHandler.debug(freshActor, "restarted")
}