diff --git a/server/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java b/server/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java index ee6b56e81fe..001a83710dc 100644 --- a/server/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java +++ b/server/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java @@ -2483,7 +2483,7 @@ public class SharedClusterSnapshotRestoreIT extends AbstractSnapshotIntegTestCas } else { logger.info("--> close index while partial snapshot is running"); closedOnPartial = true; - client.admin().indices().prepareClose("test-idx-1").get(); + client.admin().indices().prepareClose("test-idx-1").setWaitForActiveShards(ActiveShardCount.DEFAULT).get(); } } else { // non-partial snapshots do not allow close / delete operations on indices where snapshot has not been completed