Skip to content

Commit

Permalink
Fix random limit in AsyncOperatorTests (elastic#108289)
Browse files Browse the repository at this point in the history
Adjust the lower bound to include the case where the number of positions is zero.

Closes elastic#107847
  • Loading branch information
dnhatn committed May 6, 2024
1 parent 9094f79 commit a70b1d1
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -127,7 +127,7 @@ public void doClose() {
intermediateOperators.add(asyncOperator);
final Iterator<Long> it;
if (randomBoolean()) {
int limit = between(1, ids.size());
int limit = between(0, ids.size());
it = ids.subList(0, limit).iterator();
intermediateOperators.add(new LimitOperator(limit));
} else {
Expand Down

0 comments on commit a70b1d1

Please sign in to comment.