BackoffSupervisorSpec: Fix race of terminated messages (#25947)

This commit is contained in:
Christopher Batey 2018-12-05 10:25:50 +00:00 committed by Johannes Rudolph
parent 3012154ae6
commit bf714dd72a

View file

@ -330,8 +330,10 @@ class BackoffSupervisorSpec extends AkkaSpec with ImplicitSender with Eventually
awaitAssert(c3 should !==(c2))
watch(c3)
c3 ! "boom"
expectTerminated(c3)
expectTerminated(supervisor)
withClue("Expected child and supervisor to terminate") {
Set(expectMsgType[Terminated].actor, expectMsgType[Terminated].actor) shouldEqual Set(c3, supervisor)
}
}
}
}