Fix testRecoveryClosedIndex (#48506)
Fixes test failure: https://gradle-enterprise.elastic.co/s/lplb52nlth4re/tests/ftbzinkix5rme-2cwvhj3qg5qou
This commit is contained in:
parent
088988bb37
commit
7892ea8aff
|
@ -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<String, ?> 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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue