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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,8 @@ public void testClusterMigrationWithReplicationBacklog(boolean persistent, Subsc
retryStrategically((test) -> !topic1.isReplicationBacklogExist(), 10, 1000);
assertFalse(topic1.isReplicationBacklogExist());

producer1.send("test".getBytes());
// 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.

assertEquals(topic2.getProducers().size(), 2);
}

Expand Down
Loading