[Bug] Wait for outstanding requests to complete (#1925)

Signed-off-by: Suraj Singh <surajrider@gmail.com>
This commit is contained in:
Suraj Singh 2022-01-18 07:49:47 -08:00 committed by GitHub
parent d3a4c47b69
commit 7691f075cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -403,6 +403,15 @@ public class ShardIndexingPressureSettingsIT extends OpenSearchIntegTestCase {
secondSuccessFuture = client(coordinatingOnlyNode).bulk(bulkRequest);
Thread.sleep(25);
assertBusy(
() -> {
assertEquals(
coordinatingShardTracker.getCoordinatingOperationTracker().getPerformanceTracker().getTotalOutstandingRequests(),
2
);
}
);
// This request breaches the threshold and hence will be rejected
expectThrows(OpenSearchRejectedExecutionException.class, () -> client(coordinatingOnlyNode).bulk(bulkRequest).actionGet());