Skip to content

Commit

Permalink
Fix CrossClusterSearchLeakIT scroll size 0 (#78685)
Browse files Browse the repository at this point in the history
The test would provoke a scroll of size 0, fixed to always use minimum
1 as size for scrolls.

Closes #78673
  • Loading branch information
henningandersen committed Oct 6, 2021
1 parent e11077b commit 5363372
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void testSearch() throws Exception {
searchRequest.allowPartialSearchResults(false);
boolean scroll = randomBoolean();
searchRequest.source(new SearchSourceBuilder().query(new MatchAllQueryBuilder())
.aggregation(terms("f").field("f").size(docs + between(scroll ? 1 : 0, 10))).size(between(0, 1000)));
.aggregation(terms("f").field("f").size(docs + between(0, 10))).size(between(scroll ? 1 : 0, 1000)));
if (scroll) {
searchRequest.scroll("30s");
}
Expand Down

0 comments on commit 5363372

Please sign in to comment.