Fixing the SupervisorHierachySpec

This commit is contained in:
Viktor Klang 2011-09-22 12:08:00 +02:00
parent 4eb948addd
commit af0d2234bd
2 changed files with 6 additions and 6 deletions

View file

@ -34,7 +34,7 @@ class SupervisorHierarchySpec extends JUnitSuite {
val workerOne, workerTwo, workerThree = actorOf(Props(new CountDownActor(countDown)).withSupervisor(manager)) val workerOne, workerTwo, workerThree = actorOf(Props(new CountDownActor(countDown)).withSupervisor(manager))
workerOne ! Crash workerOne ! Crash(new Exception("You suck!"))
// manager + all workers should be restarted by only killing a worker // manager + all workers should be restarted by only killing a worker
// manager doesn't trap exits, so boss will restart manager // manager doesn't trap exits, so boss will restart manager

View file

@ -145,7 +145,7 @@ trait MailboxType {
case class UnboundedMailbox() extends MailboxType { case class UnboundedMailbox() extends MailboxType {
override def create(dispatcher: MessageDispatcher) = new NonblockingQueueMailbox(dispatcher) with UnboundedMessageQueueSemantics with DefaultSystemMessageImpl { override def create(dispatcher: MessageDispatcher) = new NonblockingQueueMailbox(dispatcher) with UnboundedMessageQueueSemantics with DefaultSystemMessageImpl {
val queue = new ConcurrentLinkedQueue[Envelope]() final val queue = new ConcurrentLinkedQueue[Envelope]()
} }
} }
@ -157,8 +157,8 @@ case class BoundedMailbox(
if (pushTimeOut eq null) throw new IllegalArgumentException("The push time-out for BoundedMailbox can not be null") if (pushTimeOut eq null) throw new IllegalArgumentException("The push time-out for BoundedMailbox can not be null")
override def create(dispatcher: MessageDispatcher) = new BlockingQueueMailbox(dispatcher) with BoundedMessageQueueSemantics with DefaultSystemMessageImpl { override def create(dispatcher: MessageDispatcher) = new BlockingQueueMailbox(dispatcher) with BoundedMessageQueueSemantics with DefaultSystemMessageImpl {
val queue = new LinkedBlockingQueue[Envelope](capacity) final val queue = new LinkedBlockingQueue[Envelope](capacity)
val pushTimeOut = BoundedMailbox.this.pushTimeOut final val pushTimeOut = BoundedMailbox.this.pushTimeOut
} }
} }
@ -177,8 +177,8 @@ case class BoundedPriorityMailbox(
if (pushTimeOut eq null) throw new IllegalArgumentException("The push time-out for BoundedMailbox can not be null") if (pushTimeOut eq null) throw new IllegalArgumentException("The push time-out for BoundedMailbox can not be null")
override def create(dispatcher: MessageDispatcher) = new BlockingQueueMailbox(dispatcher) with BoundedMessageQueueSemantics with DefaultSystemMessageImpl { override def create(dispatcher: MessageDispatcher) = new BlockingQueueMailbox(dispatcher) with BoundedMessageQueueSemantics with DefaultSystemMessageImpl {
val queue = new BoundedBlockingQueue[Envelope](capacity, new PriorityQueue[Envelope](11, cmp)) final val queue = new BoundedBlockingQueue[Envelope](capacity, new PriorityQueue[Envelope](11, cmp))
val pushTimeOut = BoundedPriorityMailbox.this.pushTimeOut final val pushTimeOut = BoundedPriorityMailbox.this.pushTimeOut
} }
} }