diff --git a/src/test/java/org/elasticsearch/index/suggest/stats/SuggestStatsTests.java b/src/test/java/org/elasticsearch/index/suggest/stats/SuggestStatsTests.java index 833bb26529c..1e34b002668 100644 --- a/src/test/java/org/elasticsearch/index/suggest/stats/SuggestStatsTests.java +++ b/src/test/java/org/elasticsearch/index/suggest/stats/SuggestStatsTests.java @@ -99,7 +99,8 @@ public class SuggestStatsTests extends ElasticsearchIntegrationTest { // check suggest time assertThat(indicesStats.getTotal().getSuggest().getTimeInMillis(), greaterThan(0l)); - assertThat(indicesStats.getTotal().getSuggest().getTimeInMillis(), lessThanOrEqualTo(endTime - startTime)); + // the upperbound is num shards * total time since we do searches in parallel + assertThat(indicesStats.getTotal().getSuggest().getTimeInMillis(), lessThanOrEqualTo(totalShards * (endTime - startTime))); NodesStatsResponse nodeStats = client().admin().cluster().prepareNodesStats().execute().actionGet(); NodeStats[] nodes = nodeStats.getNodes();