|
44 | 44 | import org.elasticsearch.action.ingest.GetPipelineResponse; |
45 | 45 | import org.elasticsearch.action.search.SearchResponse; |
46 | 46 | import org.elasticsearch.action.support.ActiveShardCount; |
| 47 | +import org.elasticsearch.action.support.IndicesOptions; |
47 | 48 | import org.elasticsearch.action.support.master.AcknowledgedResponse; |
48 | 49 | import org.elasticsearch.client.Client; |
49 | 50 | import org.elasticsearch.cluster.ClusterState; |
@@ -233,7 +234,7 @@ public void testBasicWorkFlow() throws Exception { |
233 | 234 |
|
234 | 235 | logger.info("--> snapshot"); |
235 | 236 | 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(); |
237 | 238 | assertThat(createSnapshotResponse.getSnapshotInfo().successfulShards(), greaterThan(0)); |
238 | 239 | assertThat(createSnapshotResponse.getSnapshotInfo().successfulShards(), |
239 | 240 | equalTo(createSnapshotResponse.getSnapshotInfo().totalShards())); |
@@ -1574,7 +1575,7 @@ public void testSnapshotClosedIndex() throws Exception { |
1574 | 1575 |
|
1575 | 1576 | logger.info("--> snapshot"); |
1576 | 1577 | 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(); |
1578 | 1579 | assertThat(createSnapshotResponse.getSnapshotInfo().indices().size(), equalTo(2)); |
1579 | 1580 | assertThat(createSnapshotResponse.getSnapshotInfo().shardFailures().size(), equalTo(0)); |
1580 | 1581 | } |
|
0 commit comments