From ee7ed387d478713ebe2f919530632dc13f83abef Mon Sep 17 00:00:00 2001 From: Boaz Leskes Date: Thu, 18 Dec 2014 09:02:10 +0100 Subject: [PATCH] Test: use less shards in SimpleQueryTests --- .../search/query/SimpleQueryTests.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/test/java/org/elasticsearch/search/query/SimpleQueryTests.java b/src/test/java/org/elasticsearch/search/query/SimpleQueryTests.java index 027a75fd2f3..e2e47732982 100644 --- a/src/test/java/org/elasticsearch/search/query/SimpleQueryTests.java +++ b/src/test/java/org/elasticsearch/search/query/SimpleQueryTests.java @@ -47,7 +47,9 @@ import org.joda.time.format.ISODateTimeFormat; import org.junit.Test; import java.io.IOException; -import java.util.*; +import java.util.HashSet; +import java.util.Random; +import java.util.Set; import java.util.concurrent.ExecutionException; import static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_NUMBER_OF_REPLICAS; @@ -63,6 +65,16 @@ import static org.hamcrest.Matchers.*; public class SimpleQueryTests extends ElasticsearchIntegrationTest { + @Override + protected int maximumNumberOfShards() { + return 7; + } + + @Override + protected int maximumNumberOfReplicas() { + return Math.min(2, cluster().numDataNodes() - 1); + } + @Test public void testOmitNormsOnAll() throws ExecutionException, InterruptedException, IOException { assertAcked(prepareCreate("test")