From c4ed57100ee6f9d03c0a10dca8aef18d12911a18 Mon Sep 17 00:00:00 2001 From: Roland Date: Tue, 6 Dec 2011 22:50:19 +0100 Subject: [PATCH] make Jenkins wait for Davy Jones MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - AkkaSpecSpec failed with nothing in the locker, but only on Jenkins - cause: Davy Jones doesn’t get a chance to run because nobody actually waits for his processing - thus, give him permission to leave this world and have him confirm that --- akka-testkit/src/test/scala/akka/testkit/AkkaSpec.scala | 2 ++ 1 file changed, 2 insertions(+) diff --git a/akka-testkit/src/test/scala/akka/testkit/AkkaSpec.scala b/akka-testkit/src/test/scala/akka/testkit/AkkaSpec.scala index 66e86a476a..5ba6e94c8c 100644 --- a/akka-testkit/src/test/scala/akka/testkit/AkkaSpec.scala +++ b/akka-testkit/src/test/scala/akka/testkit/AkkaSpec.scala @@ -128,6 +128,7 @@ class AkkaSpecSpec extends WordSpec with MustMatchers { implicit val davyJones = otherSystem.actorOf(Props(new Actor { def receive = { case m: DeadLetter ⇒ locker :+= m + case "Die!" ⇒ sender ! "finally gone"; self.stop() } }), "davyJones") @@ -148,6 +149,7 @@ class AkkaSpecSpec extends WordSpec with MustMatchers { system.registerOnTermination(latch.countDown()) system.stop() latch.await(2 seconds) + (davyJones ? "Die!").get must be === "finally gone" // this will typically also contain log messages which were sent after the logger shutdown locker must contain(DeadLetter(42, davyJones, probe.ref))