From 345b63e2d0d6259b1cfeb6f84877f1366e2c6030 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Thu, 2 May 2013 17:51:21 +0200 Subject: [PATCH] Use less agressive threshold to prevent primary relocation in recovery test --- .../gateway/local/SimpleRecoveryLocalGatewayTests.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/elasticsearch/test/integration/gateway/local/SimpleRecoveryLocalGatewayTests.java b/src/test/java/org/elasticsearch/test/integration/gateway/local/SimpleRecoveryLocalGatewayTests.java index 1b9ebe9acd2..059e413a74a 100644 --- a/src/test/java/org/elasticsearch/test/integration/gateway/local/SimpleRecoveryLocalGatewayTests.java +++ b/src/test/java/org/elasticsearch/test/integration/gateway/local/SimpleRecoveryLocalGatewayTests.java @@ -25,6 +25,7 @@ import org.elasticsearch.action.admin.indices.status.IndexShardStatus; import org.elasticsearch.action.admin.indices.status.IndicesStatusResponse; import org.elasticsearch.action.admin.indices.status.ShardStatus; import org.elasticsearch.cluster.ClusterState; +import org.elasticsearch.cluster.routing.allocation.allocator.BalancedShardsAllocator; import org.elasticsearch.common.Priority; import org.elasticsearch.common.settings.ImmutableSettings; import org.elasticsearch.common.xcontent.XContentFactory; @@ -351,7 +352,9 @@ public class SimpleRecoveryLocalGatewayTests extends AbstractNodesTests { ImmutableSettings.Builder settings = ImmutableSettings.settingsBuilder() .put("action.admin.cluster.node.shutdown.delay", "10ms") .put("gateway.recover_after_nodes", 4) - .put("gateway.type", "local"); + .put("gateway.type", "local") + .put(BalancedShardsAllocator.SETTING_THRESHOLD, 1.1f); // use less agressive settings + startNode("node1", settings); startNode("node2", settings); startNode("node3", settings);