Skip to content

Commit fd458d6

Browse files
authored
Fix Flaky SimpleQueryStringIT Tests (opensearch-project#12575)
* Fix Flaky SimpleQueryStringIT Tests Signed-off-by: kkewwei <kkewwei@163.com> * add the comment to unit test Signed-off-by: kkewwei <kkewwei@163.com> --------- Signed-off-by: kkewwei <kkewwei@163.com>
1 parent 53c0ce3 commit fd458d6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/src/internalClusterTest/java/org/opensearch/search/query/SimpleQueryStringIT.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ public static Collection<Object[]> parameters() {
112112

113113
@BeforeClass
114114
public static void createRandomClusterSetting() {
115-
CLUSTER_MAX_CLAUSE_COUNT = randomIntBetween(60, 100);
115+
// Lower bound can't be small(such as 60), simpleQueryStringQuery("foo Bar 19 127.0.0.1") in testDocWithAllTypes
116+
// will create many clauses of BooleanClause, In that way, it will throw too_many_nested_clauses exception.
117+
// So we need to set a higher bound(such as 80) to avoid failures.
118+
CLUSTER_MAX_CLAUSE_COUNT = randomIntBetween(80, 100);
116119
}
117120

118121
@Override

0 commit comments

Comments
 (0)