Skip to content

Commit d0ea642

Browse files
Also expect RELOCATING in RecoveryIT.testRecoveryClosedIndex (#49090)
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 e6c5db9 commit d0ea642

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@
5252
import static org.elasticsearch.cluster.routing.UnassignedInfo.INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING;
5353
import static org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider.INDEX_ROUTING_ALLOCATION_ENABLE_SETTING;
5454
import static org.elasticsearch.cluster.routing.allocation.decider.MaxRetryAllocationDecider.SETTING_ALLOCATION_MAX_RETRY;
55-
import static org.hamcrest.Matchers.either;
5655
import static org.hamcrest.Matchers.equalTo;
5756
import static org.hamcrest.Matchers.hasSize;
5857
import static org.hamcrest.Matchers.is;
5958
import static org.hamcrest.Matchers.isIn;
6059
import static org.hamcrest.Matchers.notNullValue;
6160
import static org.hamcrest.Matchers.nullValue;
61+
import static org.hamcrest.Matchers.oneOf;
6262

6363
/**
6464
* In depth testing of the recovery mechanism during a rolling restart.
@@ -568,7 +568,7 @@ private void assertClosedIndex(final String index, final boolean checkRoutingTab
568568
for (Map<String, ?> shard : shards) {
569569
assertThat(XContentMapValues.extractValue("shard", shard), equalTo(i));
570570
assertThat((String) XContentMapValues.extractValue("state", shard),
571-
either(equalTo("STARTED")).or(equalTo("RELOCATED")));
571+
oneOf("STARTED", "RELOCATING", "RELOCATED"));
572572
assertThat(XContentMapValues.extractValue("index", shard), equalTo(index));
573573
}
574574
}

0 commit comments

Comments
 (0)