Repository navigation
ARTEMIS-6345 Fixing flaky test - #6896
Draft
clebertsuconic wants to merge 1 commit into
Draft
clebertsuconic wants to merge 1 commit into
clebertsuconic wants to merge 1 commit into
Conversation
The Paho v5 client auto-sends PUBACK immediately after messageArrived returns. With receiveMaximum=1 the topicA PUBACK frees the single quota slot before topicB is even published, so topicB is delivered instead of being queued and the assertEquals(0, received) assertion fails. Fix both affected tests by setting manualAcks=true so the topicA message stays in-flight during the assertion window. For the noLocal test an additional race exists: after the re-subscribe the old consumer is closed, its in-flight message is re-queued, and the new consumer can re-deliver it before topicB, consuming the freed quota slot. Fix this by having the consumer publish the topicA message itself so the noLocal filter blocks re-delivery through the new consumer. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Author
|
@jbertram I fixed this flaky test with AI. let me know if you want a different fix.. (perhaps using Wait.assertSomething). or if this is good. the test doesn't fail with these changes. |
Contributor
Author
|
actually... still failed somewhere else.. but this test is flaky |
clebertsuconic
marked this pull request as draft
November 11, 2026 18:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Paho v5 client auto-sends PUBACK immediately after messageArrived returns. With receiveMaximum=1 the topicA PUBACK frees the single quota slot before topicB is even published, so topicB is delivered instead of being queued and the assertEquals(0, received) assertion fails.
Fix both affected tests by setting manualAcks=true so the topicA message stays in-flight during the assertion window.
For the noLocal test an additional race exists: after the re-subscribe the old consumer is closed, its in-flight message is re-queued, and the new consumer can re-deliver it before topicB, consuming the freed quota slot. Fix this by having the consumer publish the topicA message itself so the noLocal filter blocks re-delivery through the new consumer.