From a70b1d1d3dfad3ef7b981ca86a19fac611e62a8e Mon Sep 17 00:00:00 2001 From: Nhat Nguyen Date: Mon, 6 May 2024 07:54:27 -0700 Subject: [PATCH] Fix random limit in AsyncOperatorTests (#108289) Adjust the lower bound to include the case where the number of positions is zero. Closes #107847 --- .../org/elasticsearch/compute/operator/AsyncOperatorTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x-pack/plugin/esql/compute/src/test/java/org/elasticsearch/compute/operator/AsyncOperatorTests.java b/x-pack/plugin/esql/compute/src/test/java/org/elasticsearch/compute/operator/AsyncOperatorTests.java index 9ff04a04f9eb3..ae4558d5f8f71 100644 --- a/x-pack/plugin/esql/compute/src/test/java/org/elasticsearch/compute/operator/AsyncOperatorTests.java +++ b/x-pack/plugin/esql/compute/src/test/java/org/elasticsearch/compute/operator/AsyncOperatorTests.java @@ -127,7 +127,7 @@ public void doClose() { intermediateOperators.add(asyncOperator); final Iterator 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 {