Use RestoreSnapshotRequest in CcrRepositoryIT
Commit #37535 removed an internal restore request in favor of the RestoreSnapshotRequest. Commit #37449 added a new test that used the internal restore request. This commit modifies the new test to use the RestoreSnapshotRequest.
This commit is contained in:
parent
b6f06a48c0
commit
978c818d0f
|
@ -273,11 +273,10 @@ public class CcrRepositoryIT extends CcrIntegTestCase {
|
||||||
Settings.Builder settingsBuilder = Settings.builder()
|
Settings.Builder settingsBuilder = Settings.builder()
|
||||||
.put(IndexMetaData.SETTING_INDEX_PROVIDED_NAME, followerIndex)
|
.put(IndexMetaData.SETTING_INDEX_PROVIDED_NAME, followerIndex)
|
||||||
.put(CcrSettings.CCR_FOLLOWING_INDEX_SETTING.getKey(), true);
|
.put(CcrSettings.CCR_FOLLOWING_INDEX_SETTING.getKey(), true);
|
||||||
RestoreService.RestoreRequest restoreRequest = new RestoreService.RestoreRequest(leaderClusterRepoName,
|
RestoreSnapshotRequest restoreRequest = new RestoreSnapshotRequest(leaderClusterRepoName, CcrRepository.LATEST)
|
||||||
CcrRepository.LATEST, new String[]{leaderIndex}, indicesOptions,
|
.indices(leaderIndex).indicesOptions(indicesOptions).renamePattern("^(.*)$")
|
||||||
"^(.*)$", followerIndex, Settings.EMPTY, new TimeValue(1, TimeUnit.HOURS), false,
|
.renameReplacement(followerIndex).masterNodeTimeout(new TimeValue(1L, TimeUnit.HOURS))
|
||||||
false, true, settingsBuilder.build(), new String[0],
|
.indexSettings(settingsBuilder);
|
||||||
"restore_snapshot[" + leaderClusterRepoName + ":" + leaderIndex + "]");
|
|
||||||
|
|
||||||
PlainActionFuture<RestoreInfo> future = PlainActionFuture.newFuture();
|
PlainActionFuture<RestoreInfo> future = PlainActionFuture.newFuture();
|
||||||
restoreService.restoreSnapshot(restoreRequest, waitForRestore(clusterService, future));
|
restoreService.restoreSnapshot(restoreRequest, waitForRestore(clusterService, future));
|
||||||
|
|
Loading…
Reference in New Issue