From 9d576b4eb5e2844712b1fb08e03ad338b5e6e469 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20Andre=CC=81n?= Date: Wed, 23 Sep 2015 11:58:38 +0200 Subject: [PATCH] =per #18527 fix race condition in async stash test --- .../akka/persistence/PersistentActorStashingSpec.scala | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/akka-persistence/src/test/scala/akka/persistence/PersistentActorStashingSpec.scala b/akka-persistence/src/test/scala/akka/persistence/PersistentActorStashingSpec.scala index 16fe5f3117..b2a3a24793 100644 --- a/akka-persistence/src/test/scala/akka/persistence/PersistentActorStashingSpec.scala +++ b/akka-persistence/src/test/scala/akka/persistence/PersistentActorStashingSpec.scala @@ -163,8 +163,12 @@ class SteppingInMemPersistentActorStashingSpec extends PersistenceSpec( SteppingInmemJournal.step(journal) SteppingInmemJournal.step(journal) - persistentActor ! GetState - expectMsg(List("a", "c", "b")) + within(3.seconds) { + awaitAssert { + persistentActor ! GetState + expectMsg(List("a", "c", "b")) + } + } } }