Removing one use-site of startsWatching

This commit is contained in:
Viktor Klang 2011-12-01 23:52:16 +01:00
parent bf7befc690
commit 571d856f54

View file

@ -341,9 +341,11 @@ abstract class ActorModelSpec extends AkkaSpec {
val cachedMessage = CountDownNStop(new CountDownLatch(num))
val stopLatch = new CountDownLatch(num)
val waitTime = (30 seconds).dilated.toMillis
val boss = actorOf(Props(context {
case "run" for (_ 1 to num) (context.self startsWatching context.actorOf(props)) ! cachedMessage
case Terminated(child) stopLatch.countDown()
val boss = actorOf(Props(new Actor {
def receive = {
case "run" for (_ 1 to num) (watch(context.actorOf(props))) ! cachedMessage
case Terminated(child) stopLatch.countDown()
}
}).withDispatcher(system.dispatcherFactory.newPinnedDispatcher("boss")))
boss ! "run"
try {