-
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
Fix flakiness of IndexActionIT.testAutoGenerateIdNoDuplicates #17606
base: main
Are you sure you want to change the base?
Conversation
❌ Gradle check result for c8066a0: 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 c8066a0: 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 c8066a0: 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 c8066a0: 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? |
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.
The DCO check failed, please amend git commit
command with -s
and then force push the commit, thank you!
int numberOfIterations = scaledRandomIntBetween(10, 50); | ||
for (int i = 0; i < numberOfIterations; i++) { | ||
Exception firstError = null; | ||
createIndex("test"); | ||
createIndex(testIndex); | ||
var refRsp = client().admin().indices().refresh(new RefreshRequest(testIndex)).actionGet(); |
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.
Refresh the index after the index creation doesn't help, I think, there're no documents in the index, refresh takes no effect.
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.
I can imagine if the async deletion isn’t fully completed, remnants of previous runs may still be visible. This can result in search queries returning a higher total hit count.
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.
What do you mean by async deletion? createIndex() ensures the old index is deleted and new index is created.
Signed-off-by: Igonin <[email protected]> Co-authored-by: Benny Goerzig <[email protected]> Co-authored-by: Karsten Schnitter <[email protected]> Co-authored-by: Kai Sternad <[email protected]>
❕ Gradle check result for e0f5ae8: 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 #17606 +/- ##
=========================================
Coverage 72.44% 72.45%
+ Complexity 65732 65718 -14
=========================================
Files 5311 5311
Lines 305011 305011
Branches 44232 44232
=========================================
+ Hits 220969 220982 +13
+ Misses 65967 65914 -53
- Partials 18075 18115 +40 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
The test case org.opensearch.indexing.IndexActionIT.testAutoGenerateIdNoDuplicates is flaky.
Index refresh after creation seems to diminish the chance of wrong counter. For convenience fix was tested with 100 repetitions.
Related Issues
Resolves #16576
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.