Skip to content

Commit c37c53a

Browse files
authored
Fix testAutoExpandIndicesDuringRollingUpgrade (elastic#50427)
Fixes the muted test "testAutoExpandIndicesDuringRollingUpgrade". We can't wait in the test for the index to be green, as we have put a filter exclusion into place that prevents all shards from being allocated after a node rejoins. Instead we check whether the correct auto-expansion has taken place. Closes elastic#50426
1 parent 9646f3a commit c37c53a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

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

+1-3
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,6 @@ public void testTurnOffTranslogRetentionAfterUpgraded() throws Exception {
775775
}
776776
}
777777

778-
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/50426")
779778
public void testAutoExpandIndicesDuringRollingUpgrade() throws Exception {
780779
final String indexName = "test-auto-expand-filtering";
781780
final Version minimumNodeVersion = minimumNodeVersion();
@@ -796,12 +795,11 @@ public void testAutoExpandIndicesDuringRollingUpgrade() throws Exception {
796795
Settings.builder().put(IndexMetaData.INDEX_ROUTING_EXCLUDE_GROUP_PREFIX + "._id", nodes.get(randomInt(2))));
797796
}
798797

799-
ensureGreen(indexName);
800-
801798
final int numberOfReplicas = Integer.parseInt(
802799
getIndexSettingsAsMap(indexName).get(IndexMetaData.SETTING_NUMBER_OF_REPLICAS).toString());
803800
if (minimumNodeVersion.onOrAfter(Version.V_7_6_0)) {
804801
assertEquals(nodes.size() - 2, numberOfReplicas);
802+
ensureGreen(indexName);
805803
} else {
806804
assertEquals(nodes.size() - 1, numberOfReplicas);
807805
}

0 commit comments

Comments
 (0)