Skip to content

Commit

Permalink
Avoid size=0 for terminate_after tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jay Deng <[email protected]>
  • Loading branch information
jed326 authored and Jay Deng committed Oct 6, 2023
1 parent 5aa1863 commit a8ee52d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ public void testSimpleTerminateAfterCount() throws Exception {
SearchResponse searchResponse;
int size;
for (int i = 1; i < max; i++) {
size = randomIntBetween(0, max);
// Size=0 has known issues, see https://github.com/opensearch-project/OpenSearch/issues/10435
size = randomIntBetween(1, max);
searchResponse = client().prepareSearch("test")
.setQuery(QueryBuilders.rangeQuery("field").gte(1).lte(max))
.setTerminateAfter(i)
Expand Down

0 comments on commit a8ee52d

Please sign in to comment.