diff --git a/server/src/internalClusterTest/java/org/opensearch/indices/replication/SegmentReplicationBaseIT.java b/server/src/internalClusterTest/java/org/opensearch/indices/replication/SegmentReplicationBaseIT.java index ac2862806c858..1a3e49044fff8 100644 --- a/server/src/internalClusterTest/java/org/opensearch/indices/replication/SegmentReplicationBaseIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/indices/replication/SegmentReplicationBaseIT.java @@ -21,6 +21,7 @@ import org.opensearch.common.concurrent.GatedCloseable; import org.opensearch.common.lease.Releasable; import org.opensearch.common.settings.Settings; +import org.opensearch.common.unit.TimeValue; import org.opensearch.core.index.Index; import org.opensearch.index.IndexModule; import org.opensearch.index.IndexService; @@ -113,7 +114,7 @@ protected void waitForSearchableDocs(long docCount, List nodes) throws E public static void waitForSearchableDocs(String indexName, long docCount, List nodes) throws Exception { // wait until the replica has the latest segment generation. - assertBusy(() -> { + assertBusyWithFixedSleepTime(() -> { for (String node : nodes) { final SearchResponse response = client(node).prepareSearch(indexName).setSize(0).setPreference("_only_local").get(); final long hits = response.getHits().getTotalHits().value(); @@ -121,7 +122,7 @@ public static void waitForSearchableDocs(String indexName, long docCount, List