Skip to content

Commit

Permalink
[Backport 2.x] Fix: org.opensearch.clustermanager.ClusterManagerTaskT…
Browse files Browse the repository at this point in the history
…hrottlingIT is flaky. (#5153)

* Fix: org.opensearch.clustermanager.ClusterManagerTaskThrottlingIT is flaky. (#5152)

Signed-off-by: dblock <[email protected]>

Signed-off-by: dblock <[email protected]>
(cherry picked from commit 88757b4)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* Fix race condition in testThrottlingForSingleNode.

Signed-off-by: dblock <[email protected]>

Signed-off-by: dblock <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: dblock <[email protected]>
  • Loading branch information
3 people authored Nov 8, 2022
1 parent 93ee17e commit 1cc50af
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ public void testThrottlingForSingleNode() throws Exception {
ActionListener listener = new ActionListener() {
@Override
public void onResponse(Object o) {
latch.countDown();
successfulRequest.incrementAndGet();
latch.countDown();
}

@Override
Expand Down Expand Up @@ -164,9 +164,9 @@ public void onResponse(Object o) {

@Override
public void onFailure(Exception e) {
timedoutRequest.incrementAndGet();
latch.countDown();
assertTrue(e instanceof ProcessClusterEventTimeoutException);
timedoutRequest.incrementAndGet();
}
};
executePutMappingRequests(totalRequest, node, listener);
Expand Down

0 comments on commit 1cc50af

Please sign in to comment.