-
Notifications
You must be signed in to change notification settings - Fork 66
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
Fixed flaky hybrid collector test #984
Fixed flaky hybrid collector test #984
Conversation
Signed-off-by: Owais <[email protected]>
Can you describe at high level what was the issue and what's the leading idea for this fix? |
src/test/java/org/opensearch/neuralsearch/search/query/HybridCollectorManagerTests.java
Outdated
Show resolved
Hide resolved
Does the 2.x branch have same problem? If so we need to add |
Signed-off-by: Owais <[email protected]>
Yes, I see failure on 2.x. We should backport this one
|
Updated the description |
Looks good to me, thank you |
* Fixed flaky hybrid collector test Signed-off-by: Owais <[email protected]> * Removed explicit exception Signed-off-by: Owais <[email protected]> --------- Signed-off-by: Owais <[email protected]> (cherry picked from commit 9412884)
* Fixed flaky hybrid collector test Signed-off-by: Owais <[email protected]> * Removed explicit exception Signed-off-by: Owais <[email protected]> --------- Signed-off-by: Owais <[email protected]> (cherry picked from commit 9412884) Co-authored-by: Owais Kazi <[email protected]>
Description
Fixed flakiness of
testReduceWithConcurrentSegmentSearch_whenMultipleCollectorsMatchedDocs_thenSuccessful
Fix:
Ensured consistent document count: Instead of using RandomizedTest.randomInt() for document IDs, use fixed values or a sequence to ensure a consistent number of documents.
Control the number of documents: Add a fixed number of documents to each index, ensuring it's always greater than the number expecting in the results.
Adjust the search size: Made sure the search size (when(searchContext.size()).thenReturn(1)) is consistent with the number of documents adding and expecting in the results.
Ran test 100 times, worked fine with the change
Related Issues
Resolves #819
Check List
--signoff
.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.