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:
commit
ce9e61b065
1 changed files with 8 additions and 4 deletions
|
|
@ -403,13 +403,17 @@ class SupervisorSpec extends AkkaSpec with BeforeAndAfterEach with ImplicitSende
|
||||||
case l: TestLatch ⇒ child ! l
|
case l: TestLatch ⇒ child ! l
|
||||||
case "test" ⇒ sender ! "green"
|
case "test" ⇒ sender ! "green"
|
||||||
case "testchild" ⇒ child forward "test"
|
case "testchild" ⇒ child forward "test"
|
||||||
|
case "testchildAndAck" ⇒ child forward "test"; sender ! "ack"
|
||||||
}
|
}
|
||||||
}))
|
}))
|
||||||
|
|
||||||
val latch = TestLatch()
|
val latch = TestLatch()
|
||||||
parent ! latch
|
parent ! latch
|
||||||
parent ! "testchild"
|
parent ! "testchildAndAck"
|
||||||
EventFilter[IllegalStateException]("OHNOES", occurrences = 1) intercept {
|
expectMsg("ack")
|
||||||
|
filterEvents(
|
||||||
|
EventFilter[IllegalStateException]("OHNOES", occurrences = 1),
|
||||||
|
EventFilter.warning(pattern = "dead.*test", occurrences = 1)) {
|
||||||
latch.countDown()
|
latch.countDown()
|
||||||
}
|
}
|
||||||
expectMsg("parent restarted")
|
expectMsg("parent restarted")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue