Skip to content

[Bugfix] Fix flakiness in TieredSpilloverCacheStatsIT.testClosingShard()#18204

Merged
andrross merged 2 commits intoopensearch-project:mainfrom
peteralfonsi:fix-flaky-shard-test
May 5, 2025
Merged

[Bugfix] Fix flakiness in TieredSpilloverCacheStatsIT.testClosingShard()#18204
andrross merged 2 commits intoopensearch-project:mainfrom
peteralfonsi:fix-flaky-shard-test

Conversation

@peteralfonsi
Copy link
Contributor

Description

Fixes flakiness in TieredSpilloverCacheStatsIT.testClosingShard() by adding a 50 ms sleep before doing a check. This should ensure the asynchronous cache cleanup logic is always finished before the check.

I'm not totally sure why this only started flaking recently, around April 14. As far as I can tell no relevant code changed around then. Did something change about the way we run tests in Jenkins that might have slowed down the cache cleanup logic?

Related Issues

Resolves #14300

Check List

  • Functionality includes testing.
  • [N/A] API changes companion pull request created, if applicable.
  • [N/A] 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.

Signed-off-by: Peter Alfonsi <petealft@amazon.com>
@peteralfonsi peteralfonsi requested a review from a team as a code owner May 5, 2025 19:50
@github-actions github-actions bot added >test-failure Test failure from CI, local build, etc. autocut flaky-test Random test failure that succeeds on second run Search:Performance labels May 5, 2025
…ch/cache/common/tier/TieredSpilloverCacheStatsIT.java

Co-authored-by: Andrew Ross <andrross@amazon.com>
Signed-off-by: Peter Alfonsi <peter.alfonsi@gmail.com>
@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2025

✅ Gradle check result for db6302a: SUCCESS

@codecov
Copy link

codecov bot commented May 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.55%. Comparing base (4c2d043) to head (db6302a).
Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main   #18204   +/-   ##
=========================================
  Coverage     72.54%   72.55%           
- Complexity    67234    67286   +52     
=========================================
  Files          5476     5476           
  Lines        310444   310449    +5     
  Branches      45120    45122    +2     
=========================================
+ Hits         225211   225244   +33     
- Misses        66834    66858   +24     
+ Partials      18399    18347   -52     

☔ 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.

@andrross andrross merged commit aed1264 into opensearch-project:main May 5, 2025
30 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request May 5, 2025
…d() (#18204)

* Fix flakiness in testClosingShard()

Signed-off-by: Peter Alfonsi <petealft@amazon.com>

* Update modules/cache-common/src/internalClusterTest/java/org/opensearch/cache/common/tier/TieredSpilloverCacheStatsIT.java

Co-authored-by: Andrew Ross <andrross@amazon.com>
Signed-off-by: Peter Alfonsi <peter.alfonsi@gmail.com>

---------

Signed-off-by: Peter Alfonsi <petealft@amazon.com>
Signed-off-by: Peter Alfonsi <peter.alfonsi@gmail.com>
Co-authored-by: Peter Alfonsi <petealft@amazon.com>
Co-authored-by: Andrew Ross <andrross@amazon.com>
(cherry picked from commit aed1264)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
andrross added a commit that referenced this pull request May 8, 2025
…d() (#18204) (#18207)

* Fix flakiness in testClosingShard()



* Update modules/cache-common/src/internalClusterTest/java/org/opensearch/cache/common/tier/TieredSpilloverCacheStatsIT.java




---------





(cherry picked from commit aed1264)

Signed-off-by: Peter Alfonsi <petealft@amazon.com>
Signed-off-by: Peter Alfonsi <peter.alfonsi@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>
Co-authored-by: Peter Alfonsi <petealft@amazon.com>
Co-authored-by: Andrew Ross <andrross@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autocut backport 2.19 flaky-test Random test failure that succeeds on second run Search:Performance skip-changelog >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 TieredSpilloverCacheStatsIT

2 participants