Skip to content

Commit

Permalink
Fix flaky test MasterServiceTests.testClusterStateUpdateLoggingWithDe…
Browse files Browse the repository at this point in the history
…bugEnabled (opensearch-project#15204)

* Fix test MasterServiceTests.testClusterStateUpdateLoggingWithDebugEnabled

Signed-off-by: Sumit Bansal <sumitsb@amazon.com>
  • Loading branch information
sumitasr authored and akolarkunnu committed Sep 10, 2024
1 parent 25886a1 commit d83d522
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,8 @@ public void onFailure(String source, Exception e) {
});
assertBusy(mockAppender::assertAllExpectationsMatched);
// verify stats values after state is published
assertEquals(1, clusterManagerService.getClusterStateStats().getUpdateSuccess());
assertEquals(0, clusterManagerService.getClusterStateStats().getUpdateFailed());
assertBusy(() -> assertEquals(1, clusterManagerService.getClusterStateStats().getUpdateSuccess()));
assertBusy(() -> assertEquals(0, clusterManagerService.getClusterStateStats().getUpdateFailed()));
}
}
}
Expand Down Expand Up @@ -699,8 +699,8 @@ public void onFailure(String source, Exception e) {
});
assertBusy(mockAppender::assertAllExpectationsMatched);
// verify stats values after state is published
assertEquals(1, clusterManagerService.getClusterStateStats().getUpdateSuccess());
assertEquals(0, clusterManagerService.getClusterStateStats().getUpdateFailed());
assertBusy(() -> assertEquals(1, clusterManagerService.getClusterStateStats().getUpdateSuccess()));
assertBusy(() -> assertEquals(0, clusterManagerService.getClusterStateStats().getUpdateFailed()));
}
}
}
Expand Down

0 comments on commit d83d522

Please sign in to comment.