|
57 | 57 | import static org.elasticsearch.cluster.routing.UnassignedInfo.INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING; |
58 | 58 | import static org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider.INDEX_ROUTING_ALLOCATION_ENABLE_SETTING; |
59 | 59 | import static org.elasticsearch.cluster.routing.allocation.decider.MaxRetryAllocationDecider.SETTING_ALLOCATION_MAX_RETRY; |
60 | | -import static org.hamcrest.Matchers.either; |
61 | 60 | import static org.hamcrest.Matchers.equalTo; |
62 | 61 | import static org.hamcrest.Matchers.hasSize; |
63 | 62 | import static org.hamcrest.Matchers.is; |
64 | 63 | import static org.hamcrest.Matchers.isIn; |
65 | 64 | import static org.hamcrest.Matchers.notNullValue; |
66 | 65 | import static org.hamcrest.Matchers.nullValue; |
| 66 | +import static org.hamcrest.Matchers.oneOf; |
67 | 67 |
|
68 | 68 | /** |
69 | 69 | * In depth testing of the recovery mechanism during a rolling restart. |
@@ -597,7 +597,7 @@ private void assertClosedIndex(final String index, final boolean checkRoutingTab |
597 | 597 | for (Map<String, ?> shard : shards) { |
598 | 598 | assertThat(XContentMapValues.extractValue("shard", shard), equalTo(i)); |
599 | 599 | assertThat((String) XContentMapValues.extractValue("state", shard), |
600 | | - either(equalTo("STARTED")).or(equalTo("RELOCATED"))); |
| 600 | + oneOf("STARTED", "RELOCATING", "RELOCATED")); |
601 | 601 | assertThat(XContentMapValues.extractValue("index", shard), equalTo(index)); |
602 | 602 | } |
603 | 603 | } |
|
0 commit comments