From 581bfc74c627bde38ceae82cdfb63996be85b666 Mon Sep 17 00:00:00 2001 From: Igor Motov Date: Thu, 21 May 2015 13:36:02 -0400 Subject: [PATCH] Tests: disable rebalancing in restoreIndexWithShardsMissingInLocalGateway Rebalancing sometimes kicks in at the end of restore and interferes with reuse stats that this test relies on. --- .../snapshots/DedicatedClusterSnapshotRestoreTests.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreTests.java b/src/test/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreTests.java index 803427adea0..e607c64a2d3 100644 --- a/src/test/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreTests.java +++ b/src/test/java/org/elasticsearch/snapshots/DedicatedClusterSnapshotRestoreTests.java @@ -41,6 +41,7 @@ import org.elasticsearch.cluster.ProcessedClusterStateUpdateTask; import org.elasticsearch.cluster.AbstractDiffable; import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.cluster.metadata.MetaData.Custom; +import org.elasticsearch.cluster.routing.allocation.decider.EnableAllocationDecider; import org.elasticsearch.common.Nullable; import org.elasticsearch.common.Priority; import org.elasticsearch.common.io.stream.StreamInput; @@ -538,8 +539,12 @@ public class DedicatedClusterSnapshotRestoreTests extends AbstractSnapshotTests @Test public void restoreIndexWithShardsMissingInLocalGateway() throws Exception { logger.info("--> start 2 nodes"); - internalCluster().startNode(); - internalCluster().startNode(); + Settings nodeSettings = settingsBuilder() + .put(EnableAllocationDecider.CLUSTER_ROUTING_REBALANCE_ENABLE, EnableAllocationDecider.Rebalance.NONE) + .build(); + + internalCluster().startNode(nodeSettings); + internalCluster().startNode(nodeSettings); cluster().wipeIndices("_all"); logger.info("--> create repository");