Skip to content

Commit

Permalink
fix: flaky CurrentEventsByTagTest (#783)
Browse files Browse the repository at this point in the history
* fix: just reorder
  • Loading branch information
Roiocam committed Mar 25, 2024
1 parent 6b8afca commit 2b8871a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,14 @@ abstract class CurrentEventsByTagTest(config: String) extends QueryTestSpec(conf
val tag = "someTag"
// send a batch of 3 * 200
val batch1 = sendMessagesWithTag(tag, 200)
// Try to persist a large batch of events per actor. Some of these may be returned, but not all!
val batch2 = sendMessagesWithTag(tag, 5000)

// wait for acknowledgement of the first batch only
batch1.futureValue
// Sanity check, all events in the first batch must be in the journal
journalOps.countJournal.futureValue should be >= 600L

// Try to persist a large batch of events per actor. Some of these may be returned, but not all!
val batch2 = sendMessagesWithTag(tag, 5000)
// start the query before the last batch completes
journalOps.withCurrentEventsByTag()(tag, NoOffset) { tp =>
// The stream must complete within the given amount of time
Expand Down

0 comments on commit 2b8871a

Please sign in to comment.