-
Notifications
You must be signed in to change notification settings - Fork 127
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
Set NoMergePolicy for codec tests #754
Conversation
Sets NoMerge as merge policy for codec tests. This allows us to reliably predict how many segments will be created. Signed-off-by: John Mazanec <[email protected]>
What is the policy that is applied now, before this change? |
@@ -317,6 +320,7 @@ public void testKnnVectorIndex( | |||
IndexWriterConfig iwc = newIndexWriterConfig(); | |||
iwc.setMergeScheduler(new SerialMergeScheduler()); | |||
iwc.setCodec(codec); | |||
iwc.setMergePolicy(NoMergePolicy.INSTANCE); |
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.
Would be nice to have a comment explaining why we need this policy.
Shouldn't we modify the test itself so that it won't fail even without specifying this policy?
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 add a comment.
For testBuildFromModelTemplate and testKnnVectorIndex I dont think they are needed so I will remove.
For testMultiFieldsKnnIndex, in
assertEquals(hnswfiles.size(), 2); |
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.
More specific test with less chance of missing fault is better. In that sense, using NoMergePolicy is better I guess.
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.
Sounds good. I updated and added a comment.
@martin-gaievski TieredMergePolicy is used. |
Signed-off-by: John Mazanec <[email protected]>
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #754 +/- ##
============================================
- Coverage 85.10% 84.78% -0.33%
+ Complexity 1080 1072 -8
============================================
Files 151 151
Lines 4370 4370
Branches 390 390
============================================
- Hits 3719 3705 -14
- Misses 473 485 +12
- Partials 178 180 +2
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: John Mazanec <[email protected]>
Sets NoMerge as merge policy for codec test. This allows us to reliably predict how many segments will be created. Signed-off-by: John Mazanec <[email protected]> (cherry picked from commit b8f2deb)
Sets NoMerge as merge policy for codec test. This allows us to reliably predict how many segments will be created. Signed-off-by: John Mazanec <[email protected]> (cherry picked from commit b8f2deb)
Description
Sets NoMerge as merge policy for codec tests. This allows us to reliably predict how many segments will be created.
This fixes flaky test case that caused 3.0 build to fail
Issues Resolved
#750
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.