[2.6] [MOD-11611] fix test_vecsim:TestTimeoutReached #6917
Merged
Conversation
* test: update KNN query to use large_k and remove redundant checks * revert unnecessary changes (cherry picked from commit 8e2dd9b)
| 'PARAMS', 4, 'K', large_k, 'vec_param', query_vec.tobytes(), | ||
| 'TIMEOUT', 0) | ||
| self.env.assertEqual(res[0], n_vec) | ||
| self.env.assertEqual(res[0], large_k) |
There was a problem hiding this comment.
Bug: Inconsistent KNN Parameters Across Tests
The KNN timeout tests use inconsistent K and LIMIT parameters. The no-timeout test uses a fixed large_k (1000), while the timeout tests still use n_vec (the full index size). This runs different queries, undermining timeout validation. Also, the no-timeout test's assertion for large_k results may fail if the index has fewer than 1000 vectors.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 2.6 #6917 +/- ##
==========================================
- Coverage 86.41% 86.38% -0.04%
==========================================
Files 186 186
Lines 32270 32270
==========================================
- Hits 27886 27875 -11
- Misses 4384 4395 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
GuyAv46
approved these changes
Sep 29, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
backport of #6904 to 2.6
Note
In
TestTimeoutReached.run_long_queries, cap KNN results at 1000 and drop no-timeout success assertions for range and hybrid queries, updating expectations accordingly.TestTimeoutReached.run_long_queries:large_k = 1000; useLIMIT 0, 1000andK=1000; expectres[0] == 1000.BATCHES,ADHOC_BF) queries.Written by Cursor Bugbot for commit 6f47c25. This will update automatically on new commits. Configure here.