diff --git a/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/RecoveryIT.java b/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/RecoveryIT.java index d3bb9780afc..5ad1ce64f1c 100644 --- a/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/RecoveryIT.java +++ b/qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/RecoveryIT.java @@ -57,6 +57,7 @@ import static com.carrotsearch.randomizedtesting.RandomizedTest.randomAsciiOfLen import static org.elasticsearch.cluster.routing.UnassignedInfo.INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING; import static org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider.INDEX_ROUTING_ALLOCATION_ENABLE_SETTING; import static org.elasticsearch.cluster.routing.allocation.decider.MaxRetryAllocationDecider.SETTING_ALLOCATION_MAX_RETRY; +import static org.hamcrest.Matchers.either; import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; @@ -595,7 +596,8 @@ public class RecoveryIT extends AbstractRollingTestCase { assertThat(shards.size(), equalTo(numberOfReplicas + 1)); for (Map shard : shards) { assertThat(XContentMapValues.extractValue("shard", shard), equalTo(i)); - assertThat(XContentMapValues.extractValue("state", shard), equalTo("STARTED")); + assertThat((String) XContentMapValues.extractValue("state", shard), + either(equalTo("STARTED")).or(equalTo("RELOCATED"))); assertThat(XContentMapValues.extractValue("index", shard), equalTo(index)); } }