diff --git a/server/src/test/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateServiceTests.java b/server/src/test/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateServiceTests.java index a5a9e5ee22796..6faaf8e133800 100644 --- a/server/src/test/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateServiceTests.java +++ b/server/src/test/java/org/elasticsearch/cluster/metadata/MetaDataIndexStateServiceTests.java @@ -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; @@ -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) {