Merge pull request #1332 from drewhk/wip-3229-supervisorspec-failed-drewhk

SupervisorSpec implicitly relied on a loss of a message
This commit is contained in:
drewhk 2013-04-15 08:51:24 -07:00
commit ce9e61b065

View file

@ -403,13 +403,17 @@ class SupervisorSpec extends AkkaSpec with BeforeAndAfterEach with ImplicitSende
case l: TestLatch child ! l
case "test" sender ! "green"
case "testchild" child forward "test"
case "testchildAndAck" child forward "test"; sender ! "ack"
}
}))
val latch = TestLatch()
parent ! latch
parent ! "testchild"
EventFilter[IllegalStateException]("OHNOES", occurrences = 1) intercept {
parent ! "testchildAndAck"
expectMsg("ack")
filterEvents(
EventFilter[IllegalStateException]("OHNOES", occurrences = 1),
EventFilter.warning(pattern = "dead.*test", occurrences = 1)) {
latch.countDown()
}
expectMsg("parent restarted")