Skip to content

Commit

Permalink
[Close Index API] Adapt MetaDataIndexStateServiceTests after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
tlrx committed Dec 17, 2018
1 parent 79999d3 commit ef6ae69
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.elasticsearch.cluster.metadata;

import com.google.common.collect.ImmutableList;
import org.elasticsearch.Version;
import org.elasticsearch.action.support.master.AcknowledgedResponse;
import org.elasticsearch.cluster.ClusterName;
Expand Down Expand Up @@ -267,8 +268,10 @@ private static ClusterState addRestoredIndex(final String index, final int numSh

final Snapshot snapshot = new Snapshot(randomAlphaOfLength(10), new SnapshotId(randomAlphaOfLength(5), randomAlphaOfLength(5)));
final RestoreInProgress.Entry entry =
new RestoreInProgress.Entry(snapshot, RestoreInProgress.State.INIT, Collections.singletonList(index), shardsBuilder.build());
return ClusterState.builder(newState).putCustom(RestoreInProgress.TYPE, new RestoreInProgress(entry)).build();
new RestoreInProgress.Entry("_uuid", snapshot, RestoreInProgress.State.INIT, ImmutableList.of(index), shardsBuilder.build());
return ClusterState.builder(newState)
.putCustom(RestoreInProgress.TYPE, new RestoreInProgress.Builder().add(entry).build())
.build();
}

private static ClusterState addSnapshotIndex(final String index, final int numShards, final int numReplicas, final ClusterState state) {
Expand Down

0 comments on commit ef6ae69

Please sign in to comment.