From a8ee52dbf35850e6dfdee0bfaa779befe1643384 Mon Sep 17 00:00:00 2001 From: Jay Deng Date: Thu, 5 Oct 2023 17:05:16 -0700 Subject: [PATCH] Avoid size=0 for terminate_after tests Signed-off-by: Jay Deng --- .../java/org/opensearch/search/simple/SimpleSearchIT.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/internalClusterTest/java/org/opensearch/search/simple/SimpleSearchIT.java b/server/src/internalClusterTest/java/org/opensearch/search/simple/SimpleSearchIT.java index 95b36311f6b8b..c64cc25b48b10 100644 --- a/server/src/internalClusterTest/java/org/opensearch/search/simple/SimpleSearchIT.java +++ b/server/src/internalClusterTest/java/org/opensearch/search/simple/SimpleSearchIT.java @@ -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)