Fixing ActorPoolSpec (more specifically the ActiveActorsPressure thingie-device) and stopping the typed actors after the test of the spec

This commit is contained in:
Viktor Klang 2011-11-08 11:25:15 +01:00
parent 3681d0fe4e
commit fd130d0310
2 changed files with 5 additions and 2 deletions

View file

@ -351,6 +351,7 @@ class ActorPoolSpec extends AkkaSpec {
val value = r.get val value = r.get
value must equal(i * i) value must equal(i * i)
} }
app.typedActor.stop(pool)
} }
"provide default supervision of pooled actors" in { "provide default supervision of pooled actors" in {

View file

@ -296,8 +296,10 @@ trait MailboxPressureCapacitor {
trait ActiveActorsPressureCapacitor { trait ActiveActorsPressureCapacitor {
def pressure(delegates: Seq[ActorRef]): Int = def pressure(delegates: Seq[ActorRef]): Int =
delegates count { delegates count {
case a: LocalActorRef !a.underlying.sender.isShutdown case a: LocalActorRef
case _ false val cell = a.underlying
cell.mailbox.isScheduled && cell.currentMessage != null
case _ false
} }
} }