-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Forbid use of Thread.sleep in :server:internalClusterTest #20088
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
Conversation
|
❌ Gradle check result for af39fb1: 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? |
server/src/internalClusterTest/java/org/opensearch/search/sort/FieldSortIT.java
Show resolved
Hide resolved
reta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanup, thanks @andrross !
|
❌ Gradle check result for af39fb1: null 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? |
|
❌ Gradle check result for af39fb1: 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? |
|
❌ Gradle check result for af39fb1: 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? |
Signed-off-by: Andrew Ross <andrross@amazon.com>
af39fb1 to
cbdb02f
Compare
|
❌ Gradle check result for cbdb02f: null 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? |
jainankitk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a reasonable expectation to not use Thread.sleep as part of tests!
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #20088 +/- ##
============================================
- Coverage 73.33% 73.30% -0.04%
+ Complexity 71679 71667 -12
============================================
Files 5790 5790
Lines 327549 327667 +118
Branches 47181 47204 +23
============================================
- Hits 240217 240181 -36
- Misses 68080 68197 +117
- Partials 19252 19289 +37 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…-project#20088) Signed-off-by: Andrew Ross <andrross@amazon.com>
Description
This commit introduces enforcement to cause any future usage of Thread.sleep within :server:internalClusterTest to fail by default. It can still be overridden when necessary by using
@SuppressForbidden.For the existing usages of Thread.sleep(), I have either annotated them with some sort of rationale, replaced them with a polling alternative, or just removed them all together. I ran
./gradlew :server:internalClusterTest100 times over the weekend, and while it failed nearly half the time, none of the tests modified here were implicated.Related Issues
Related to #20004
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.