From acdfaf436f439b7c0ec2ce800f02b58044d4ccac Mon Sep 17 00:00:00 2001 From: David Pilato Date: Mon, 9 Dec 2013 08:41:29 +0100 Subject: [PATCH] Use random number of iteration for tests Thanks @simonw for the review. Related to #4361 and #4371. --- .../search/matchedqueries/MatchedQueriesTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/elasticsearch/search/matchedqueries/MatchedQueriesTests.java b/src/test/java/org/elasticsearch/search/matchedqueries/MatchedQueriesTests.java index c5fa4cb3a8c2c..cd3343e1c6b21 100644 --- a/src/test/java/org/elasticsearch/search/matchedqueries/MatchedQueriesTests.java +++ b/src/test/java/org/elasticsearch/search/matchedqueries/MatchedQueriesTests.java @@ -216,8 +216,8 @@ public void testMatchedWithShould() throws Exception { 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()