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][broker] Fix flaky test case - testClusterMigrationWithReplicationBacklog #20546

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vineeth1995
Copy link
Contributor

@vineeth1995 vineeth1995 commented Jun 8, 2023

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

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jun 8, 2023
// verify that the producer1 is now connected to migrated cluster "r2" since backlog is cleared.
retryStrategically((test) -> topic2.getProducers().size() == 2, 60, 1000);
Copy link
Contributor

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

Copy link
Contributor Author

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.

@github-actions
Copy link

The pr had no activity for 30 days, mark with Stale label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants