[TEST] use a real upperbound for the check on the time spend during suggestions

This commit is contained in:
Simon Willnauer 2014-04-12 21:54:46 +02:00
parent e9c0dd9ae4
commit ec3c635696
1 changed files with 2 additions and 1 deletions

View File

@ -99,7 +99,8 @@ public class SuggestStatsTests extends ElasticsearchIntegrationTest {
// check suggest time // check suggest time
assertThat(indicesStats.getTotal().getSuggest().getTimeInMillis(), greaterThan(0l)); 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(); NodesStatsResponse nodeStats = client().admin().cluster().prepareNodesStats().execute().actionGet();
NodeStats[] nodes = nodeStats.getNodes(); NodeStats[] nodes = nodeStats.getNodes();