Skip to content

Commit a2853f3

Browse files
committed
Use random number of iteration for tests
Thanks @simonw for the review. Related to elastic#4361 and elastic#4371.
1 parent bc9698a commit a2853f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/test/java/org/elasticsearch/search/matchedqueries/MatchedQueriesTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ public void testMatchedWithShould() throws Exception {
216216
client().prepareIndex("test", "type1", "2").setSource("content", "consectetur adipisicing elit").get();
217217
refresh();
218218

219-
// Execute search 5 times to load it in cache
220-
for (int i = 0; i < 5; i++) {
219+
// Execute search at least two times to load it in cache
220+
for (int i = 0; i < atLeast(2); i++) {
221221
SearchResponse searchResponse = client().prepareSearch()
222222
.setQuery(
223223
boolQuery()

0 commit comments

Comments
 (0)