Browse Source

Fix random limit in AsyncOperatorTests (#108289)

Adjust the lower bound to include the case where the number of positions is zero.

Closes #107847
Nhat Nguyen 1 năm trước cách đây
mục cha
commit
3913b6f720

+ 1 - 1
x-pack/plugin/esql/compute/src/test/java/org/elasticsearch/compute/operator/AsyncOperatorTests.java

@@ -127,7 +127,7 @@ public class AsyncOperatorTests extends ESTestCase {
         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 {