Use random number of iteration for tests

Thanks @simonw for the review.
Related to #4361 and #4371.
This commit is contained in:
David Pilato 2013-12-09 08:41:29 +01:00
parent bc9698a347
commit a2853f3855
1 changed files with 2 additions and 2 deletions

View File

@ -216,8 +216,8 @@ public class MatchedQueriesTests extends ElasticsearchIntegrationTest {
client().prepareIndex("test", "type1", "2").setSource("content", "consectetur adipisicing elit").get();
refresh();
// Execute search 5 times to load it in cache
for (int i = 0; i < 5; i++) {
// Execute search at least two times to load it in cache
for (int i = 0; i < atLeast(2); i++) {
SearchResponse searchResponse = client().prepareSearch()
.setQuery(
boolQuery()