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 <dblock@dblock.org>

Signed-off-by: dblock <dblock@dblock.org>
(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 <dblock@dblock.org>

Signed-off-by: dblock <dblock@dblock.org>
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 <dblock@dblock.org>
(cherry picked from commit 1cc50af)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and dblock committed Nov 9, 2022
1 parent ebd4d85 commit 8874216
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 8874216

Please sign in to comment.