[fix][test] Fix flaky OneWayReplicatorDeduplicationTest.testDeduplication#39
Closed
Praveenkumar76 wants to merge 1 commit intomasterfrom
Closed
[fix][test] Fix flaky OneWayReplicatorDeduplicationTest.testDeduplication#39Praveenkumar76 wants to merge 1 commit intomasterfrom
Praveenkumar76 wants to merge 1 commit intomasterfrom
Conversation
2cc1fee to
57403b2
Compare
sandeep-mst
approved these changes
May 6, 2026
Collaborator
There was a problem hiding this comment.
LGTM
@Praveenkumar76 Assuming that the fix is tested well and is working as expected. As it's flaky, you should run it multiple times.
Collaborator
Author
|
yeah, I ran it multiple times locally, before raising and it looks stable |
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.
Fixes apache#25141
Motivation
OneWayReplicatorDeduplicationTest.testDeduplicationis flaky becauseMessageDeduplication.takeSnapshotis designed to drop concurrent snapshot requests if an existing snapshot operation is already in progress. The test relies on specific positions being persisted, but if a manual trigger is dropped due to this intentional "lossy" design, the test fails with aConditionTimeoutExceptionwhile waiting for the state to update.Modifications
Modified
OneWayReplicatorDeduplicationTestto setbrokerDeduplicationSnapshotIntervalSecondsto 1 second in the test configuration.By increasing the frequency of the background snapshot monitor, the system is guaranteed to capture and persist the deduplication state frequently enough to satisfy the test's assertions, even if a specific manual trigger request is skipped due to a race condition.
Verifying this change
This change is already covered by existing tests, such as:
org.apache.pulsar.broker.service.OneWayReplicatorDeduplicationTest.testDeduplicationDoes this pull request potentially affect one of the following parts: