Skip to content

Commit a000d86

Browse files
[7.x] Also expect RELOCATING in RecoveryIT.testRecoveryClosedIndex (#49090) (#49154)
In addition to the fix in #48506, it seems we could also get the `RELOCATING` state. This fixes the failure in https://gradle-enterprise.elastic.co/s/svjmmvqk32cii/tests/ua7icdau7nz6y-2cwvhj3qg5qou?openStackTraces=WzBd
1 parent 89b3c32 commit a000d86

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qa/rolling-upgrade/src/test/java/org/elasticsearch/upgrades/RecoveryIT.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@
5757
import static org.elasticsearch.cluster.routing.UnassignedInfo.INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING;
5858
import static org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider.INDEX_ROUTING_ALLOCATION_ENABLE_SETTING;
5959
import static org.elasticsearch.cluster.routing.allocation.decider.MaxRetryAllocationDecider.SETTING_ALLOCATION_MAX_RETRY;
60-
import static org.hamcrest.Matchers.either;
6160
import static org.hamcrest.Matchers.equalTo;
6261
import static org.hamcrest.Matchers.hasSize;
6362
import static org.hamcrest.Matchers.is;
6463
import static org.hamcrest.Matchers.isIn;
6564
import static org.hamcrest.Matchers.notNullValue;
6665
import static org.hamcrest.Matchers.nullValue;
66+
import static org.hamcrest.Matchers.oneOf;
6767

6868
/**
6969
* In depth testing of the recovery mechanism during a rolling restart.
@@ -597,7 +597,7 @@ private void assertClosedIndex(final String index, final boolean checkRoutingTab
597597
for (Map<String, ?> shard : shards) {
598598
assertThat(XContentMapValues.extractValue("shard", shard), equalTo(i));
599599
assertThat((String) XContentMapValues.extractValue("state", shard),
600-
either(equalTo("STARTED")).or(equalTo("RELOCATED")));
600+
oneOf("STARTED", "RELOCATING", "RELOCATED"));
601601
assertThat(XContentMapValues.extractValue("index", shard), equalTo(index));
602602
}
603603
}

0 commit comments

Comments
 (0)