Skip to content

Fix flaky org.opensearch.http.netty4.Netty4HttpRequestSizeLimitIT.testDoesNotLimitExcludedRequests test case#21565

Merged
reta merged 1 commit into
opensearch-project:mainfrom
reta:issue-18875
May 8, 2026
Merged

Fix flaky org.opensearch.http.netty4.Netty4HttpRequestSizeLimitIT.testDoesNotLimitExcludedRequests test case#21565
reta merged 1 commit into
opensearch-project:mainfrom
reta:issue-18875

Conversation

@reta
Copy link
Copy Markdown
Contributor

@reta reta commented May 8, 2026

Description

Fix flaky org.opensearch.http.netty4.Netty4HttpRequestSizeLimitIT.testDoesNotLimitExcludedRequests test case

Related Issues

Closes #18875

Check List

  • Functionality includes testing.
  • API changes companion pull request created, if applicable.
  • Public documentation issue/PR created, if applicable.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@reta reta added flaky-test Random test failure that succeeds on second run skip-diff-analyzer Maintainer to skip code-diff-analyzer check, after reviewing issues in AI analysis. labels May 8, 2026
@github-actions github-actions Bot added >test-failure Test failure from CI, local build, etc. autocut labels May 8, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

PR Reviewer Guide 🔍

(Review updated until commit 989768c)

Here are some key observations to aid the review process:

🧪 No relevant tests
🔒 No security concerns identified
✅ No TODO sections
🔀 No multiple PR themes
⚡ Recommended focus areas for review

Possible Issue

The loop creates 1500 tuples but never uses them. The requestUris.add() call is inside the loop, but the list is populated and then not passed to any method that would send these requests. This means the test may not actually be testing what it intends to test with 1500 requests.

for (int i = 0; i < 1500; i++) {
    requestUris.add(
        Tuple.tuple("/_cluster/settings?cluster_manager_timeout=10s", "{ \"transient\": {\"search.default_search_timeout\": -1 } }")
    );
}

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Validate timeout value range

The timeout value concatenation creates invalid JSON when i is large (e.g.,
"1499s"). Consider using a more reasonable timeout range or ensuring the generated
values are valid for the search.default_search_timeout setting to prevent test
failures due to invalid configurations.

modules/transport-netty4/src/internalClusterTest/java/org/opensearch/http/netty4/Netty4HttpRequestSizeLimitIT.java [128]

-requestUris.add(Tuple.tuple("/_cluster/settings", "{ \"transient\": {\"search.default_search_timeout\": \"" + i + "s\" } }"));
+requestUris.add(Tuple.tuple("/_cluster/settings", "{ \"transient\": {\"search.default_search_timeout\": \"" + (i % 100 + 1) + "s\" } }"));
Suggestion importance[1-10]: 3

__

Why: The suggestion assumes that large timeout values like "1499s" create invalid JSON or invalid configurations, but provides no evidence that this is actually problematic. The JSON syntax itself is valid, and the suggestion to use modulo arithmetic (i % 100 + 1) seems arbitrary without demonstrating an actual issue with the current implementation.

Low

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

❌ Gradle check result for 699493a: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

…tDoesNotLimitExcludedRequests test case

Signed-off-by: Andriy Redko <drreta@gmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

Persistent review updated to latest commit 989768c

@reta reta marked this pull request as ready for review May 8, 2026 19:34
@reta reta requested review from a team and peternied as code owners May 8, 2026 19:34
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

❌ Gradle check result for 989768c: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

❕ Gradle check result for 989768c: UNSTABLE

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.52%. Comparing base (d09b185) to head (989768c).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #21565      +/-   ##
============================================
+ Coverage     73.45%   73.52%   +0.06%     
- Complexity    74591    74639      +48     
============================================
  Files          5980     5980              
  Lines        338779   338779              
  Branches      48848    48848              
============================================
+ Hits         248849   249086     +237     
+ Misses        70079    69874     -205     
+ Partials      19851    19819      -32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@reta reta merged commit 0d31e28 into opensearch-project:main May 8, 2026
22 of 24 checks passed
reta pushed a commit that referenced this pull request May 9, 2026
…tDoesNotLimitExcludedRequests test case (#21565) (#21571)

(cherry picked from commit 0d31e28)

Signed-off-by: Andriy Redko <drreta@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autocut backport 3.6 flaky-test Random test failure that succeeds on second run skip-diff-analyzer Maintainer to skip code-diff-analyzer check, after reviewing issues in AI analysis. >test-failure Test failure from CI, local build, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[AUTOCUT] Gradle Check Flaky Test Report for Netty4HttpRequestSizeLimitIT

2 participants