Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: flaky CurrentEventsByTagTest #783

Merged
merged 11 commits into from
Mar 25, 2024
Merged

Conversation

Roiocam
Copy link
Contributor

@Roiocam Roiocam commented Nov 1, 2023

References #782

Delay persistence to the start of the query

@Roiocam Roiocam marked this pull request as draft November 1, 2023 15:53
@Roiocam Roiocam marked this pull request as ready for review November 1, 2023 17:01
@Roiocam Roiocam closed this Nov 1, 2023
@Roiocam Roiocam reopened this Nov 1, 2023
@Roiocam
Copy link
Contributor Author

Roiocam commented Nov 1, 2023

CI check passed, close and reopn PR to trigger CI check run again.

@Roiocam Roiocam marked this pull request as draft November 1, 2023 17:06
Copy link
Contributor Author

@Roiocam Roiocam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check failed again, the same error occurred.

@@ -191,6 +203,8 @@ abstract class CurrentEventsByTagTest(config: String) extends QueryTestSpec(conf

// start the query before the last batch completes
journalOps.withCurrentEventsByTag()(tag, NoOffset) { tp =>
// when query begin running, unlock the barrier.
latch.countDown()
// The stream must complete within the given amount of time
// This make take a while in case the journal sequence actor detects gaps
val allEvents = tp.toStrict(atMost = 20.seconds)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The flaky/unstable assert on here, It depends on the execution speed.

@Roiocam Roiocam closed this Nov 10, 2023
@Roiocam Roiocam reopened this Nov 10, 2023
@Roiocam Roiocam closed this Nov 10, 2023
@Roiocam Roiocam reopened this Nov 10, 2023

// 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)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like this reordering works, CI check passed twice, trigger check again.

@Roiocam Roiocam closed this Nov 10, 2023
@Roiocam Roiocam reopened this Nov 10, 2023
@Roiocam Roiocam marked this pull request as ready for review November 10, 2023 03:36
Copy link
Member

@ennru ennru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for trying this out, sorry for letting it sit here for so long.
LGTM.

@ennru ennru force-pushed the flaky-intergration-tests branch from 9b64693 to 9c8b5a5 Compare March 25, 2024 18:30
@ennru ennru merged commit 2b8871a into akka:main Mar 25, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants