Skip to content

Commit d094107

Browse files
committed
Fix SharedClusterSnapshotRestoreIT
Relates to #39644
1 parent fef11f7 commit d094107

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import org.elasticsearch.action.ingest.GetPipelineResponse;
4545
import org.elasticsearch.action.search.SearchResponse;
4646
import org.elasticsearch.action.support.ActiveShardCount;
47+
import org.elasticsearch.action.support.IndicesOptions;
4748
import org.elasticsearch.action.support.master.AcknowledgedResponse;
4849
import org.elasticsearch.client.Client;
4950
import org.elasticsearch.cluster.ClusterState;
@@ -233,7 +234,7 @@ public void testBasicWorkFlow() throws Exception {
233234

234235
logger.info("--> snapshot");
235236
CreateSnapshotResponse createSnapshotResponse = client.admin().cluster().prepareCreateSnapshot("test-repo", "test-snap")
236-
.setWaitForCompletion(true).setIndices(indicesToSnapshot).get();
237+
.setWaitForCompletion(true).setIndicesOptions(IndicesOptions.lenientExpand()).setIndices(indicesToSnapshot).get();
237238
assertThat(createSnapshotResponse.getSnapshotInfo().successfulShards(), greaterThan(0));
238239
assertThat(createSnapshotResponse.getSnapshotInfo().successfulShards(),
239240
equalTo(createSnapshotResponse.getSnapshotInfo().totalShards()));
@@ -1574,7 +1575,7 @@ public void testSnapshotClosedIndex() throws Exception {
15741575

15751576
logger.info("--> snapshot");
15761577
CreateSnapshotResponse createSnapshotResponse = client.admin().cluster().prepareCreateSnapshot("test-repo", "test-snap")
1577-
.setWaitForCompletion(true).setIndices("test-idx*").get();
1578+
.setWaitForCompletion(true).setIndices("test-idx*").setIndicesOptions(IndicesOptions.lenientExpand()).get();
15781579
assertThat(createSnapshotResponse.getSnapshotInfo().indices().size(), equalTo(2));
15791580
assertThat(createSnapshotResponse.getSnapshotInfo().shardFailures().size(), equalTo(0));
15801581
}

0 commit comments

Comments
 (0)