diff --git a/akka-actor-tests/src/test/scala/akka/actor/dispatch/ActorModelSpec.scala b/akka-actor-tests/src/test/scala/akka/actor/dispatch/ActorModelSpec.scala index 5d4fd68501..2506ec7281 100644 --- a/akka-actor-tests/src/test/scala/akka/actor/dispatch/ActorModelSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/actor/dispatch/ActorModelSpec.scala @@ -115,11 +115,16 @@ object ActorModelSpec { val stops = new AtomicLong(0) def getStats(actorRef: ActorRef) = { - val is = new InterceptorStats - stats.putIfAbsent(actorRef, is) match { - case null ⇒ is - case other ⇒ other + stats.get(actorRef) match { + case null ⇒ + val is = new InterceptorStats + stats.putIfAbsent(actorRef, is) match { + case null ⇒ is + case other ⇒ other + } + case existing ⇒ existing } + } protected[akka] abstract override def suspend(actor: ActorCell) { @@ -414,7 +419,7 @@ abstract class ActorModelSpec(config: String) extends AkkaSpec(config) with Defa } } for (run ← 1 to 3) { - flood(50000) + flood(10000) assertDispatcher(dispatcher)(stops = run) } }