From 69848210d64eef7027fb9df3cdef620c73e04684 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Sat, 31 Aug 2013 09:12:25 +0200 Subject: [PATCH] Allow up to 10% unbalance in random allocator tests --- .../routing/allocation/RandomAllocationDeciderTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/elasticsearch/test/unit/cluster/routing/allocation/RandomAllocationDeciderTests.java b/src/test/java/org/elasticsearch/test/unit/cluster/routing/allocation/RandomAllocationDeciderTests.java index ee22e11ba4c..3b0e74dec23 100644 --- a/src/test/java/org/elasticsearch/test/unit/cluster/routing/allocation/RandomAllocationDeciderTests.java +++ b/src/test/java/org/elasticsearch/test/unit/cluster/routing/allocation/RandomAllocationDeciderTests.java @@ -157,8 +157,8 @@ public class RandomAllocationDeciderTests extends ElasticsearchTestCase { int shards = clusterState.routingNodes().shardsWithState(ShardRoutingState.STARTED).size(); assertThat(shards, equalTo(totalNumShards)); final int numNodes = clusterState.nodes().size(); - final int upperBound = (int) Math.round(((shards / numNodes) * 1.05)); - final int lowerBound = (int) Math.round(((shards / numNodes) * 0.05)); + final int upperBound = (int) Math.round(((shards / numNodes) * 1.10)); + final int lowerBound = (int) Math.round(((shards / numNodes) * 0.90)); for (int i = 0; i < nodeIdCounter; i++) { if (clusterState.getRoutingNodes().node("NODE_" + i) == null) { continue;