Reduce number of indices created in ClusterSettingsIT#20681
Reduce number of indices created in ClusterSettingsIT#20681andrross merged 1 commit intoopensearch-project:mainfrom
Conversation
When the number indices created in this test was sufficiently high, tests would frequently hit this failure at some point when creating a file: ``` Caused by: java.nio.file.FileSystemException: /var/jenkins/workspace/gradle-check/search/server/build/testrun/internalClusterTest/temp/org.opensearch.cluster.settings.ClusterSettingsIT_129BF1D803EFDA59-001/tempDir-002/node_s0/nodes/0/_state/_a1_Asserting_0.doc: Too many open files at org.apache.lucene.tests.mockfile.HandleLimitFS.onOpen(HandleLimitFS.java:67) at org.apache.lucene.tests.mockfile.HandleTrackingFS.callOpenHook(HandleTrackingFS.java:82) at org.apache.lucene.tests.mockfile.HandleTrackingFS.newOutputStream(HandleTrackingFS.java:163) at java.****/java.nio.file.Files.newOutputStream(Files.java:215) ``` This commit changes the random range from [10, 50] to be a fixed value of 3. This still gets the same coverage without unnecessarily increasing test runtime and introducing flakiness around file handle limits. Signed-off-by: Andrew Ross <andrross@amazon.com>
|
No actionable comments were generated in the recent review. 🎉 📜 Recent review detailsConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
🔇 Additional comments (1)
📝 WalkthroughWalkthroughThe change makes a flaky test deterministic by replacing a random loop iteration count (10-50 times) with a fixed count of 3 in Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Tip Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord. Comment |
jainankitk
left a comment
There was a problem hiding this comment.
Looks fine to me. The purpose of this test does not require random number causing unnecessary flakiness
|
❌ Gradle check result for 173f764: 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? |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #20681 +/- ##
============================================
- Coverage 73.32% 73.26% -0.06%
+ Complexity 72064 71973 -91
============================================
Files 5781 5781
Lines 329395 329402 +7
Branches 47525 47526 +1
============================================
- Hits 241536 241352 -184
- Misses 68507 68676 +169
- Partials 19352 19374 +22 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
When the number indices created in this test was sufficiently high, tests would frequently hit this failure at some point when creating a file:
This commit changes the random range from [10, 50] to be a fixed value of 3. This still gets the same coverage without unnecessarily increasing test runtime and introducing flakiness around file handle limits.
Resolves #20652
This flakiness was introduced by #20140
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.