Skip to content

Commit

Permalink
Fix Flaky SimpleQueryStringIT Tests (opensearch-project#12575)
Browse files Browse the repository at this point in the history
* Fix Flaky SimpleQueryStringIT Tests

Signed-off-by: kkewwei <[email protected]>

* add the comment to unit test

Signed-off-by: kkewwei <[email protected]>

---------

Signed-off-by: kkewwei <[email protected]>
  • Loading branch information
kkewwei authored Mar 21, 2024
1 parent 53c0ce3 commit fd458d6
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ public static Collection<Object[]> parameters() {

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

@Override
Expand Down

0 comments on commit fd458d6

Please sign in to comment.