diff --git a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java index 5615e53ddcc29..dbb571513aeb2 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java @@ -1447,12 +1447,11 @@ public void run() { safeAwait(barrier); final var snapshotName = randomIdentifier(); - final var partialSnapshot = randomBoolean(); ActionFuture snapshotFuture = clusterAdmin().prepareCreateSnapshot( TEST_REQUEST_TIMEOUT, repoName, snapshotName - ).setIndices(indexName).setWaitForCompletion(true).setPartial(partialSnapshot).execute(); + ).setIndices(indexName).setWaitForCompletion(true).setPartial(true).execute(); // we have currently blocked the start-snapshot task from running, and it will be followed by at least three blob uploads // (segments_N, .cfe, .cfs), executed one-at-a-time because of throttling to the max threadpool size, so it's safe to let up to @@ -1466,7 +1465,7 @@ public void run() { assertFalse(snapshotFuture.isDone()); try { - if (partialSnapshot && randomBoolean()) { + if (randomBoolean()) { logger.info("--> closing index [{}]", indexName); safeGet(indicesAdmin().prepareClose(indexName).execute()); ensureGreen(indexName);