Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix flaky test - handle IllegalStateException and throw AssertionError to use assertbusy #11981

Merged

Conversation

linuxpi
Copy link
Collaborator

@linuxpi linuxpi commented Jan 23, 2024

Description

  • Fixes flaky test org.opensearch.remotestore.RemoteStoreClusterStateRestoreIT.testFullClusterRestoreGlobalMetadata
  • We were not using assertBusy properly, handled IllegalStateException and throwing AssertionError

Related Issues

Resolves #10749

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Failing checks are inspected and point to the corresponding known issue(s) (See: Troubleshooting Failing Builds)
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)
  • Public documentation issue/PR created

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.

@github-actions github-actions bot added bug Something isn't working Cluster Manager flaky-test Random test failure that succeeds on second run Storage:Remote labels Jan 23, 2024
@linuxpi linuxpi added skip-changelog and removed bug Something isn't working flaky-test Random test failure that succeeds on second run Cluster Manager Storage:Remote labels Jan 23, 2024
@github-actions github-actions bot added bug Something isn't working Cluster Manager flaky-test Random test failure that succeeds on second run Storage:Remote labels Jan 23, 2024
Copy link
Contributor

github-actions bot commented Jan 23, 2024

Compatibility status:

Checks if related components are compatible with change 4a631f2

Incompatible components

Incompatible components: [https://github.com/opensearch-project/custom-codecs.git, https://github.com/opensearch-project/performance-analyzer.git, https://github.com/opensearch-project/cross-cluster-replication.git, https://github.com/opensearch-project/performance-analyzer-rca.git]

Skipped components

Compatible components

Compatible components: [https://github.com/opensearch-project/asynchronous-search.git, https://github.com/opensearch-project/security-analytics.git, https://github.com/opensearch-project/observability.git, https://github.com/opensearch-project/reporting.git, https://github.com/opensearch-project/notifications.git, https://github.com/opensearch-project/opensearch-oci-object-storage.git, https://github.com/opensearch-project/job-scheduler.git, https://github.com/opensearch-project/neural-search.git, https://github.com/opensearch-project/common-utils.git, https://github.com/opensearch-project/geospatial.git, https://github.com/opensearch-project/security.git, https://github.com/opensearch-project/anomaly-detection.git, https://github.com/opensearch-project/index-management.git, https://github.com/opensearch-project/ml-commons.git, https://github.com/opensearch-project/alerting.git, https://github.com/opensearch-project/sql.git, https://github.com/opensearch-project/k-nn.git]

Copy link
Contributor

❌ Gradle check result for b191308: 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?

@linuxpi
Copy link
Collaborator Author

linuxpi commented Jan 23, 2024

[Test Result](https://build.ci.opensearch.org/job/gradle-check/32483/testReport/) (1 failure / -8)

    [org.opensearch.ratelimitting.admissioncontrol.AdmissionControlMultiNodeIT.testAdmissionControlRejectionOnDisabled](https://build.ci.opensearch.org/job/gradle-check/32483/testReport/junit/org.opensearch.ratelimitting.admissioncontrol/AdmissionControlMultiNodeIT/testAdmissionControlRejectionOnDisabled/)

changes are unrelated to the failing test

@deshsidd
Copy link
Contributor

LGTM. How many times have we run the test to test for flakiness fixed? Looks like a build is failing.

@linuxpi
Copy link
Collaborator Author

linuxpi commented Jan 26, 2024

LGTM. How many times have we run the test to test for flakiness fixed? Looks like a build is failing.

Not able to repro after fix in 5k iterations. Retried the build

Copy link
Contributor

✅ Gradle check result for 4a631f2: SUCCESS

Copy link

codecov bot commented Jan 26, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (e265355) 71.41% compared to head (4a631f2) 71.46%.
Report is 20 commits behind head on main.

Files Patch % Lines
...g/opensearch/common/util/ReorganizingLongHash.java 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11981      +/-   ##
============================================
+ Coverage     71.41%   71.46%   +0.05%     
- Complexity    59397    59429      +32     
============================================
  Files          4923     4923              
  Lines        279212   279214       +2     
  Branches      40595    40596       +1     
============================================
+ Hits         199408   199552     +144     
+ Misses        63223    63040     -183     
- Partials      16581    16622      +41     

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

@linuxpi linuxpi self-assigned this Jan 31, 2024
@sachinpkale sachinpkale merged commit bf5e628 into opensearch-project:main Jan 31, 2024
29 of 30 checks passed
@sachinpkale sachinpkale added the backport 2.x Backport to 2.x branch label Jan 31, 2024
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 31, 2024
…r to use assertbusy (#11981)

* fix flaky test - handle IllegalStateException and throw AssertionError to use assertbusy

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

* Empty Commit to retry the build

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

---------

Signed-off-by: bansvaru <[email protected]>
(cherry picked from commit bf5e628)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
VachaShah pushed a commit that referenced this pull request Feb 8, 2024
…r to use assertbusy (#11981) (#12109)

* fix flaky test - handle IllegalStateException and throw AssertionError to use assertbusy



* Empty Commit to retry the build



---------


(cherry picked from commit bf5e628)

Signed-off-by: bansvaru <[email protected]>
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>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 10, 2024
…r to use assertbusy (#11981) (#12109)

* fix flaky test - handle IllegalStateException and throw AssertionError to use assertbusy

* Empty Commit to retry the build

---------

(cherry picked from commit bf5e628)

Signed-off-by: bansvaru <[email protected]>
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>
(cherry picked from commit 2011c13)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
msfroh pushed a commit that referenced this pull request Feb 10, 2024
…r to use assertbusy (#11981) (#12109) (#12282)

* fix flaky test - handle IllegalStateException and throw AssertionError to use assertbusy

* Empty Commit to retry the build

---------

(cherry picked from commit bf5e628)




(cherry picked from commit 2011c13)

Signed-off-by: bansvaru <[email protected]>
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>
peteralfonsi pushed a commit to peteralfonsi/OpenSearch that referenced this pull request Mar 1, 2024
…r to use assertbusy (opensearch-project#11981)

* fix flaky test - handle IllegalStateException and throw AssertionError to use assertbusy

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

* Empty Commit to retry the build

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

---------

Signed-off-by: bansvaru <[email protected]>
rayshrey pushed a commit to rayshrey/OpenSearch that referenced this pull request Mar 18, 2024
…r to use assertbusy (opensearch-project#11981)

* fix flaky test - handle IllegalStateException and throw AssertionError to use assertbusy

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

* Empty Commit to retry the build

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

---------

Signed-off-by: bansvaru <[email protected]>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…r to use assertbusy (opensearch-project#11981)

* fix flaky test - handle IllegalStateException and throw AssertionError to use assertbusy

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

* Empty Commit to retry the build

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

---------

Signed-off-by: bansvaru <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch bug Something isn't working Cluster Manager flaky-test Random test failure that succeeds on second run skip-changelog Storage:Remote
Projects
None yet
3 participants