[Bug] Wait for outstanding requests to complete (#1925)
Signed-off-by: Suraj Singh <surajrider@gmail.com>
This commit is contained in:
parent
d3a4c47b69
commit
7691f075cb
|
@ -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());
|
||||
|
||||
|
|
Loading…
Reference in New Issue