From cabd24e3cf380cde7655381c81ef2f2ea5278d9e Mon Sep 17 00:00:00 2001 From: Dianna Hohensee Date: Mon, 21 Aug 2023 15:01:08 -0400 Subject: [PATCH] Remove redundant ensureStableCluster() calls in testing after startNode*, which implicitly calls validateClusterFormed(). --- .../cluster/allocation/ClusterAllocationExplainIT.java | 7 ------- 1 file changed, 7 deletions(-) diff --git a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainIT.java b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainIT.java index 1a7c0ce13eccf..08e30a65ba98b 100644 --- a/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainIT.java +++ b/server/src/internalClusterTest/java/org/elasticsearch/action/admin/cluster/allocation/ClusterAllocationExplainIT.java @@ -298,7 +298,6 @@ public void testUnassignedReplicaWithPriorCopy() throws Exception { logger.info("--> restarting the stopped nodes"); internalCluster().startNode(Settings.builder().put("node.name", nodes.get(0)).put(node0DataPathSettings).build()); internalCluster().startNode(Settings.builder().put("node.name", nodes.get(1)).put(node1DataPathSettings).build()); - ensureStableCluster(3); boolean includeYesDecisions = randomBoolean(); boolean includeDiskInfo = randomBoolean(); @@ -612,7 +611,6 @@ public void testAllocationFilteringPreventsShardMove() throws Exception { public void testRebalancingNotAllowed() throws Exception { logger.info("--> starting a single node"); internalCluster().startNode(); - ensureStableCluster(1); prepareIndex(5, 0); @@ -621,7 +619,6 @@ public void testRebalancingNotAllowed() throws Exception { logger.info("--> starting another node, with rebalancing disabled, it should get no shards"); internalCluster().startNode(); - ensureStableCluster(2); boolean includeYesDecisions = randomBoolean(); boolean includeDiskInfo = randomBoolean(); @@ -720,7 +717,6 @@ public void testRebalancingNotAllowed() throws Exception { public void testWorseBalance() throws Exception { logger.info("--> starting a single node"); internalCluster().startNode(); - ensureStableCluster(1); prepareIndex(5, 0); @@ -729,7 +725,6 @@ public void testWorseBalance() throws Exception { logger.info("--> starting another node, with the rebalance threshold so high, it should not get any shards"); internalCluster().startNode(); - ensureStableCluster(2); boolean includeYesDecisions = randomBoolean(); boolean includeDiskInfo = randomBoolean(); @@ -820,7 +815,6 @@ public void testWorseBalance() throws Exception { public void testBetterBalanceButCannotAllocate() throws Exception { logger.info("--> starting a single node"); String firstNode = internalCluster().startNode(); - ensureStableCluster(1); prepareIndex(5, 0); @@ -829,7 +823,6 @@ public void testBetterBalanceButCannotAllocate() throws Exception { logger.info("--> starting another node, with filtering not allowing allocation to the new node, it should not get any shards"); internalCluster().startNode(); - ensureStableCluster(2); boolean includeYesDecisions = randomBoolean(); boolean includeDiskInfo = randomBoolean();