|
@@ -349,7 +349,7 @@ public class DataStreamsSnapshotsIT extends AbstractSnapshotIntegTestCase {
|
|
|
|
|
|
RestoreSnapshotRequest restoreSnapshotRequest = new RestoreSnapshotRequest(REPO, SNAPSHOT);
|
|
|
restoreSnapshotRequest.waitForCompletion(true);
|
|
|
- restoreSnapshotRequest.includeGlobalState(true);
|
|
|
+ restoreSnapshotRequest.includeGlobalState(false);
|
|
|
if (filterDuringSnapshotting == false) {
|
|
|
restoreSnapshotRequest.indices(dataStreamToSnapshot);
|
|
|
}
|
|
@@ -391,9 +391,7 @@ public class DataStreamsSnapshotsIT extends AbstractSnapshotIntegTestCase {
|
|
|
}
|
|
|
|
|
|
public void testSnapshotAndRestoreReplaceAll() throws Exception {
|
|
|
- CreateSnapshotRequest createSnapshotRequest = new CreateSnapshotRequest(REPO, SNAPSHOT);
|
|
|
- createSnapshotRequest.waitForCompletion(true);
|
|
|
- createSnapshotRequest.includeGlobalState(false);
|
|
|
+ var createSnapshotRequest = new CreateSnapshotRequest(REPO, SNAPSHOT).waitForCompletion(true).includeGlobalState(false);
|
|
|
CreateSnapshotResponse createSnapshotResponse = client.admin().cluster().createSnapshot(createSnapshotRequest).actionGet();
|
|
|
|
|
|
RestStatus status = createSnapshotResponse.getSnapshotInfo().status();
|
|
@@ -403,9 +401,7 @@ public class DataStreamsSnapshotsIT extends AbstractSnapshotIntegTestCase {
|
|
|
assertAcked(client.execute(DeleteDataStreamAction.INSTANCE, new DeleteDataStreamAction.Request(new String[] { "*" })).get());
|
|
|
assertAcked(client.admin().indices().prepareDelete("*").setIndicesOptions(IndicesOptions.LENIENT_EXPAND_OPEN_CLOSED_HIDDEN));
|
|
|
|
|
|
- RestoreSnapshotRequest restoreSnapshotRequest = new RestoreSnapshotRequest(REPO, SNAPSHOT);
|
|
|
- restoreSnapshotRequest.waitForCompletion(true);
|
|
|
- restoreSnapshotRequest.includeGlobalState(true);
|
|
|
+ var restoreSnapshotRequest = new RestoreSnapshotRequest(REPO, SNAPSHOT).waitForCompletion(true).includeGlobalState(false);
|
|
|
RestoreSnapshotResponse restoreSnapshotResponse = client.admin().cluster().restoreSnapshot(restoreSnapshotRequest).actionGet();
|
|
|
|
|
|
assertEquals(2, restoreSnapshotResponse.getRestoreInfo().successfulShards());
|
|
@@ -449,9 +445,7 @@ public class DataStreamsSnapshotsIT extends AbstractSnapshotIntegTestCase {
|
|
|
}
|
|
|
|
|
|
public void testSnapshotAndRestoreAll() throws Exception {
|
|
|
- CreateSnapshotRequest createSnapshotRequest = new CreateSnapshotRequest(REPO, SNAPSHOT);
|
|
|
- createSnapshotRequest.waitForCompletion(true);
|
|
|
- createSnapshotRequest.includeGlobalState(false);
|
|
|
+ var createSnapshotRequest = new CreateSnapshotRequest(REPO, SNAPSHOT).waitForCompletion(true).includeGlobalState(false);
|
|
|
CreateSnapshotResponse createSnapshotResponse = client.admin().cluster().createSnapshot(createSnapshotRequest).actionGet();
|
|
|
|
|
|
RestStatus status = createSnapshotResponse.getSnapshotInfo().status();
|
|
@@ -461,9 +455,7 @@ public class DataStreamsSnapshotsIT extends AbstractSnapshotIntegTestCase {
|
|
|
assertAcked(client.execute(DeleteDataStreamAction.INSTANCE, new DeleteDataStreamAction.Request(new String[] { "*" })).get());
|
|
|
assertAcked(client.admin().indices().prepareDelete("*").setIndicesOptions(IndicesOptions.LENIENT_EXPAND_OPEN_CLOSED_HIDDEN));
|
|
|
|
|
|
- RestoreSnapshotRequest restoreSnapshotRequest = new RestoreSnapshotRequest(REPO, SNAPSHOT);
|
|
|
- restoreSnapshotRequest.waitForCompletion(true);
|
|
|
- restoreSnapshotRequest.includeGlobalState(true);
|
|
|
+ var restoreSnapshotRequest = new RestoreSnapshotRequest(REPO, SNAPSHOT).waitForCompletion(true).includeGlobalState(false);
|
|
|
RestoreSnapshotResponse restoreSnapshotResponse = client.admin().cluster().restoreSnapshot(restoreSnapshotRequest).actionGet();
|
|
|
assertEquals(2, restoreSnapshotResponse.getRestoreInfo().successfulShards());
|
|
|
|
|
@@ -507,9 +499,7 @@ public class DataStreamsSnapshotsIT extends AbstractSnapshotIntegTestCase {
|
|
|
}
|
|
|
|
|
|
public void testSnapshotAndRestoreIncludeAliasesFalse() throws Exception {
|
|
|
- CreateSnapshotRequest createSnapshotRequest = new CreateSnapshotRequest(REPO, SNAPSHOT);
|
|
|
- createSnapshotRequest.waitForCompletion(true);
|
|
|
- createSnapshotRequest.includeGlobalState(false);
|
|
|
+ var createSnapshotRequest = new CreateSnapshotRequest(REPO, SNAPSHOT).waitForCompletion(true).includeGlobalState(false);
|
|
|
CreateSnapshotResponse createSnapshotResponse = client.admin().cluster().createSnapshot(createSnapshotRequest).actionGet();
|
|
|
|
|
|
RestStatus status = createSnapshotResponse.getSnapshotInfo().status();
|
|
@@ -519,10 +509,9 @@ public class DataStreamsSnapshotsIT extends AbstractSnapshotIntegTestCase {
|
|
|
assertAcked(client.execute(DeleteDataStreamAction.INSTANCE, new DeleteDataStreamAction.Request(new String[] { "*" })).get());
|
|
|
assertAcked(client.admin().indices().prepareDelete("*").setIndicesOptions(IndicesOptions.LENIENT_EXPAND_OPEN_CLOSED_HIDDEN));
|
|
|
|
|
|
- RestoreSnapshotRequest restoreSnapshotRequest = new RestoreSnapshotRequest(REPO, SNAPSHOT);
|
|
|
- restoreSnapshotRequest.waitForCompletion(true);
|
|
|
- restoreSnapshotRequest.includeGlobalState(true);
|
|
|
- restoreSnapshotRequest.includeAliases(false);
|
|
|
+ var restoreSnapshotRequest = new RestoreSnapshotRequest(REPO, SNAPSHOT).waitForCompletion(true)
|
|
|
+ .includeGlobalState(false)
|
|
|
+ .includeAliases(false);
|
|
|
RestoreSnapshotResponse restoreSnapshotResponse = client.admin().cluster().restoreSnapshot(restoreSnapshotRequest).actionGet();
|
|
|
assertEquals(2, restoreSnapshotResponse.getRestoreInfo().successfulShards());
|
|
|
|