Introduce parental supervision, BUT TESTS ARE STILL FAILING
- every actor is now supervised, where the root of the tree is app.guardian, which has its supervisor field set to a special ActorRef obtained from provider.theOneWhoWalksTheBubblesOfSpaceTime (this name is meant to indicate that this ref is outside of the universe, cf. Michio Kaku) - changed all tests to obtain specially supervised children (i.e. not top-level) via (supervisor ? Props).as[ActorRef].get - add private[akka] ScalaActorRef.sendSystemMessage for sending Supervise() - everything routing or remote is broken wrt. supervision, as that was not “properly” implemented to begin with, will be tackled after app/supervision/eventbus/AkkaSpec are stabilized enough
This commit is contained in:
parent
25e8eb1422
commit
d3837b9fc3
34 changed files with 290 additions and 226 deletions
|
|
@ -19,8 +19,8 @@ import akka.AkkaApplication
|
|||
* @author Roland Kuhn
|
||||
* @since 1.1
|
||||
*/
|
||||
class TestActorRef[T <: Actor](_app: AkkaApplication, props: Props, address: String)
|
||||
extends LocalActorRef(_app, props.withDispatcher(new CallingThreadDispatcher(_app)), address, false) {
|
||||
class TestActorRef[T <: Actor](_app: AkkaApplication, _props: Props, _supervisor: ActorRef, address: String)
|
||||
extends LocalActorRef(_app, _props.withDispatcher(new CallingThreadDispatcher(_app)), _supervisor, address, false) {
|
||||
/**
|
||||
* Directly inject messages into actor receive behavior. Any exceptions
|
||||
* thrown will be available to you, while still being able to use
|
||||
|
|
@ -48,7 +48,10 @@ object TestActorRef {
|
|||
|
||||
def apply[T <: Actor](props: Props)(implicit app: AkkaApplication): TestActorRef[T] = apply[T](props, Props.randomAddress)
|
||||
|
||||
def apply[T <: Actor](props: Props, address: String)(implicit app: AkkaApplication): TestActorRef[T] = new TestActorRef(app, props, address)
|
||||
def apply[T <: Actor](props: Props, address: String)(implicit app: AkkaApplication): TestActorRef[T] = apply[T](props, app.guardian, address)
|
||||
|
||||
def apply[T <: Actor](props: Props, supervisor: ActorRef, address: String)(implicit app: AkkaApplication): TestActorRef[T] =
|
||||
new TestActorRef(app, props, supervisor, address)
|
||||
|
||||
def apply[T <: Actor](implicit m: Manifest[T], app: AkkaApplication): TestActorRef[T] = apply[T](Props.randomAddress)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue