Catch possible actor init exceptions

This commit is contained in:
Peter Vlugter 2011-03-25 17:08:42 +13:00
parent 898d555826
commit b436ff995e

View file

@ -260,11 +260,23 @@ class RestartStrategySpec extends JUnitSuite {
// now crash again... should not restart
slave ! Crash
slave ! Ping
// may not be running
try {
slave ! Ping
} catch {
case e: ActorInitializationException => ()
}
assert(countDownLatch.await(1, TimeUnit.SECONDS))
slave ! Crash
// may not be running
try {
slave ! Crash
} catch {
case e: ActorInitializationException => ()
}
assert(stopLatch.tryAwait(1, TimeUnit.SECONDS))
assert(maxNoOfRestartsLatch.tryAwait(1,TimeUnit.SECONDS))