-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Fix faulty assertion in AutoForceMergeManagerTests #19024
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
Merged
andrross
merged 1 commit into
opensearch-project:main
from
andrross:fix-AutoForceMergeManagerTests
Aug 12, 2025
Merged
Fix faulty assertion in AutoForceMergeManagerTests #19024
andrross
merged 1 commit into
opensearch-project:main
from
andrross:fix-AutoForceMergeManagerTests
Aug 12, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit removes a non-deterministic sleep and properly asserts that the AutoForceMergeManager completes quickly when interrupted. The previous test logic had a race condition where it checked the interrupt status of the thread, but that could return false if the thread was in the process of catching the InterruptException but had not yet reset the interrupt flag of the thread. The new logic is to set the delay to be the maximum of 60 seconds and assert that the test thread exits more quickly than that due to being interrupted. Signed-off-by: Andrew Ross <[email protected]>
717ea14 to
d10335a
Compare
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #19024 +/- ##
============================================
- Coverage 72.92% 72.92% -0.01%
- Complexity 69383 69389 +6
============================================
Files 5645 5645
Lines 318787 318787
Branches 46125 46125
============================================
- Hits 232481 232472 -9
- Misses 67458 67492 +34
+ Partials 18848 18823 -25 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
cwperks
approved these changes
Aug 12, 2025
RajatGupta02
pushed a commit
to RajatGupta02/OpenSearch
that referenced
this pull request
Aug 18, 2025
…t#19024) This commit removes a non-deterministic sleep and properly asserts that the AutoForceMergeManager completes quickly when interrupted. The previous test logic had a race condition where it checked the interrupt status of the thread, but that could return false if the thread was in the process of catching the InterruptException but had not yet reset the interrupt flag of the thread. The new logic is to set the delay to be the maximum of 60 seconds and assert that the test thread exits more quickly than that due to being interrupted. Signed-off-by: Andrew Ross <[email protected]>
atris
pushed a commit
to atris/OpenSearch
that referenced
this pull request
Aug 28, 2025
…t#19024) This commit removes a non-deterministic sleep and properly asserts that the AutoForceMergeManager completes quickly when interrupted. The previous test logic had a race condition where it checked the interrupt status of the thread, but that could return false if the thread was in the process of catching the InterruptException but had not yet reset the interrupt flag of the thread. The new logic is to set the delay to be the maximum of 60 seconds and assert that the test thread exits more quickly than that due to being interrupted. Signed-off-by: Andrew Ross <[email protected]>
kh3ra
pushed a commit
to kh3ra/OpenSearch
that referenced
this pull request
Sep 5, 2025
…t#19024) This commit removes a non-deterministic sleep and properly asserts that the AutoForceMergeManager completes quickly when interrupted. The previous test logic had a race condition where it checked the interrupt status of the thread, but that could return false if the thread was in the process of catching the InterruptException but had not yet reset the interrupt flag of the thread. The new logic is to set the delay to be the maximum of 60 seconds and assert that the test thread exits more quickly than that due to being interrupted. Signed-off-by: Andrew Ross <[email protected]>
vinaykpud
pushed a commit
to vinaykpud/OpenSearch
that referenced
this pull request
Sep 26, 2025
…t#19024) This commit removes a non-deterministic sleep and properly asserts that the AutoForceMergeManager completes quickly when interrupted. The previous test logic had a race condition where it checked the interrupt status of the thread, but that could return false if the thread was in the process of catching the InterruptException but had not yet reset the interrupt flag of the thread. The new logic is to set the delay to be the maximum of 60 seconds and assert that the test thread exits more quickly than that due to being interrupted. Signed-off-by: Andrew Ross <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
autocut
flaky-test
Random test failure that succeeds on second run
skip-changelog
>test-failure
Test failure from CI, local build, etc.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit removes a non-deterministic sleep and properly asserts that the AutoForceMergeManager completes quickly when interrupted. The previous test logic had a race condition where it checked the interrupt status of the thread, but that could return false if the thread was in the process of catching the InterruptException but had not yet reset the interrupt flag of the thread. The new logic is to set the delay to be the maximum of 60 seconds and assert that the test thread exits more quickly than that due to being interrupted.
Related Issues
Resolves #18820
Check List
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.