-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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][broker] Fix flaky test case - testClusterMigrationWithReplicationBacklog #20546
base: master
Are you sure you want to change the base?
Conversation
// verify that the producer1 is now connected to migrated cluster "r2" since backlog is cleared. | ||
retryStrategically((test) -> topic2.getProducers().size() == 2, 60, 1000); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we can remove line-463
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Line 463 is assertion. Line 462 just does retries until the condition satisfies and exits after the specified retries are exhausted.
The pr had no activity for 30 days, mark with Stale label. |
Motivation
Fix issue- 20375
Fix the flaky test case introduced by this pr - #19605
Modifications
Add retry block before asserting if the producer is connected to green cluster as this will provide enough time to the producer to reconnect to green cluster after the replication backlog is drained. The retry block will provide 60 secs time for the producer to reconnect checking at the periodic intervals of 500ms since the default max backoff time is 60 secs.
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete