Skip to content

Commit

Permalink
Fixing Flaky Test testLeaderDoAssignmentForNewlyElectedLeaderFailureP…
Browse files Browse the repository at this point in the history
…athVariation (#953)

Co-authored-by: Shrinand Thakkar <sthakkar@sthakkar-mn2.linkedin.biz>
  • Loading branch information
shrinandthakkar and Shrinand Thakkar authored Aug 15, 2023
1 parent d19a2c2 commit 2678147
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4062,6 +4062,8 @@ protected synchronized void handleEvent(CoordinatorEvent event) {
Datastream testDatastream =
DatastreamTestUtils.createAndStoreDatastreams(zkClient, testCluster, connectorType, streamName)[0];

// Blocking until we have performed atleast 5 retries of LeaderDoAssignmentEvent with a newly elected leader.
PollUtils.poll(() -> shadowListWithPreviousAndNewHeadPairsAtNewLeaderDoAssignmentEvent.size() > 5, 50, 2000);
coordinator.stop();
zkClient.close();
coordinator.getDatastreamCache().getZkclient().close();
Expand Down

0 comments on commit 2678147

Please sign in to comment.