Skip to content

Commit

Permalink
fix: use barrier to block the persisting
Browse files Browse the repository at this point in the history
  • Loading branch information
Roiocam committed Nov 1, 2023
1 parent 603bded commit 733aa96
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,13 @@ abstract class CurrentEventsByTagTest(config: String) extends QueryTestSpec(conf
val futures = for (actor <- Seq(actor1, actor2, actor3); i <- 1 to numberOfMessagesPerActor) yield {
// block the execution
if (i == numberOfMessagesPerActor / 2) {
latch.await()
Future {
latch.await()
actor ? TaggedAsyncEvent(Event(i.toString), tag)
}
} else {
actor ? TaggedAsyncEvent(Event(i.toString), tag)
}
actor ? TaggedAsyncEvent(Event(i.toString), tag)
}
Future.sequence(futures).map(_ => Done)
}
Expand Down

0 comments on commit 733aa96

Please sign in to comment.