diff --git a/src/test/java/org/elasticsearch/search/facet/SimpleFacetsTests.java b/src/test/java/org/elasticsearch/search/facet/SimpleFacetsTests.java index fd6a64fba9b..4bc0624ebf4 100644 --- a/src/test/java/org/elasticsearch/search/facet/SimpleFacetsTests.java +++ b/src/test/java/org/elasticsearch/search/facet/SimpleFacetsTests.java @@ -197,7 +197,7 @@ public class SimpleFacetsTests extends ElasticsearchIntegrationTest { .field("foo", "" + i) .endObject()).execute().actionGet(); } - int shardSize = numberOfShards() > 5 ? 20 : 10; + int shardSize = getNumShards("test").numPrimaries > 5 ? 20 : 10; String[] execHint = new String[]{"map", null}; for (String hint : execHint) {