Skip to content

Commit 08bad48

Browse files
authored
Simplify NodeShutdownShardsIT (#114583)
We no longer need to manually reroute after registering node shutdown in test since #103251
1 parent 1d03781 commit 08bad48

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

x-pack/plugin/shutdown/src/internalClusterTest/java/org/elasticsearch/xpack/shutdown/NodeShutdownShardsIT.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -327,11 +327,8 @@ public void testAutoExpandDuringRestart() throws Exception {
327327
ensureGreen("myindex");
328328

329329
putNodeShutdown(primaryNodeId, SingleNodeShutdownMetadata.Type.RESTART, null);
330-
// registering node shutdown entry does not perform reroute, neither should it.
331-
// we provoke it here in the test to ensure that auto-expansion has run.
332-
updateIndexSettings(Settings.builder().put("index.routing.allocation.exclude.name", "non-existent"), "myindex");
333330

334-
assertBusy(() -> assertIndexSetting("myindex", "index.number_of_replicas", "1"));
331+
assertIndexSetting("myindex", "index.number_of_replicas", "1");
335332
indexRandomData("myindex");
336333

337334
internalCluster().restartNode(primaryNode, new InternalTestCluster.RestartCallback() {
@@ -361,9 +358,6 @@ public void testAutoExpandDuringReplace() throws Exception {
361358
var replacementNodeName = "node_t2";
362359

363360
putNodeShutdown(nodeIdToReplace, SingleNodeShutdownMetadata.Type.REPLACE, replacementNodeName);
364-
// registering node shutdown entry does not perform reroute, neither should it.
365-
// we provoke it here in the test to ensure that auto-expansion has run.
366-
updateIndexSettings(Settings.builder().put("index.routing.allocation.exclude.name", "non-existent"), "index");
367361

368362
ensureGreen("index");
369363
assertIndexSetting("index", "index.number_of_replicas", "1");

0 commit comments

Comments
 (0)