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()
|
||||
.put(IndexMetaData.SETTING_INDEX_PROVIDED_NAME, followerIndex)
|
||||
.put(CcrSettings.CCR_FOLLOWING_INDEX_SETTING.getKey(), true);
|
||||
RestoreService.RestoreRequest restoreRequest = new RestoreService.RestoreRequest(leaderClusterRepoName,
|
||||
CcrRepository.LATEST, new String[]{leaderIndex}, indicesOptions,
|
||||
"^(.*)$", followerIndex, Settings.EMPTY, new TimeValue(1, TimeUnit.HOURS), false,
|
||||
false, true, settingsBuilder.build(), new String[0],
|
||||
"restore_snapshot[" + leaderClusterRepoName + ":" + leaderIndex + "]");
|
||||
RestoreSnapshotRequest restoreRequest = new RestoreSnapshotRequest(leaderClusterRepoName, CcrRepository.LATEST)
|
||||
.indices(leaderIndex).indicesOptions(indicesOptions).renamePattern("^(.*)$")
|
||||
.renameReplacement(followerIndex).masterNodeTimeout(new TimeValue(1L, TimeUnit.HOURS))
|
||||
.indexSettings(settingsBuilder);
|
||||
|
||||
PlainActionFuture<RestoreInfo> future = PlainActionFuture.newFuture();
|
||||
restoreService.restoreSnapshot(restoreRequest, waitForRestore(clusterService, future));
|
||||
|
|
Loading…
Reference in New Issue