-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Explicitly disable FeatureFlag in MetadataCreateIndexServiceTests.testCreateIndexWithContextDisabled #17384
Conversation
…reFlags being enabled Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
❕ Gradle check result for 43fa229: 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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #17384 +/- ##
============================================
+ Coverage 72.38% 72.46% +0.08%
- Complexity 65516 65556 +40
============================================
Files 5291 5291
Lines 304319 304319
Branches 44176 44176
============================================
+ Hits 220269 220513 +244
+ Misses 65964 65779 -185
+ Partials 18086 18027 -59 ☔ View full report in Codecov by Sentry. |
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Signed-off-by: Craig Perkins <[email protected]>
Thank you @andrross for helping me understand how the tests are actually run for the gradle check. See #12134 (comment) for more details. Each test suite is run in a forked JVM and tests are run serially so there's no risk of concurrent modification to static state. Usually these errors indicate improper test cleanup. I plan to add a section in https://github.com/opensearch-project/OpenSearch/blob/36c89bf4f975bd2750423d1308d2cd3408d8553f/TESTING.md#L2-L1 to describe the test process occurring on the jenkins runners in greater detail. |
❌ Gradle check result for 9b622cd: 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 9b622cd: 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 9b622cd: 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. |
@reta I've been trying to fix flaky tests that I have seen in dependabot PRs which should be reliably passing CI checks. This is a small one to clear FeatureFlags after each test run. |
Description
This PR is an attempt to fix flakiness seen in tests that rely on FeatureFlags being enabled. Unfortunately, the FeatureFlags class relies on static data structures to be available node-wide statically. In a single node, it can be reliable but it becomes an issue for tests since different tests may rely on FeatureFlags being toggled on/off.
This PR ensures that any feature flag toggled on for an individual test is cleared afterwards.
Related Issues
Resolves #17291
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.