[TEST] use a real upperbound for the check on the time spend during suggestions
This commit is contained in:
parent
e9c0dd9ae4
commit
ec3c635696
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue