Skip to content

[2.6] [MOD-11611] fix test_vecsim:TestTimeoutReached #6917

Merged
meiravgri merged 1 commit into2.6from
backport-6904-to-2.6
Sep 29, 2025
Merged

[2.6] [MOD-11611] fix test_vecsim:TestTimeoutReached #6917
meiravgri merged 1 commit into2.6from
backport-6904-to-2.6

Conversation

@meiravgri
Copy link
Collaborator

@meiravgri meiravgri commented Sep 29, 2025

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.

  • tests/pytests/test_vecsim.py:
    • TestTimeoutReached.run_long_queries:
      • Cap standard KNN query to large_k = 1000; use LIMIT 0, 1000 and K=1000; expect res[0] == 1000.
      • Remove no-timeout success checks for RANGE query.
      • Remove no-timeout success checks for HYBRID (BATCHES, ADHOC_BF) queries.
      • Keep timeout failure checks unchanged.

Written by Cursor Bugbot for commit 6f47c25. This will update automatically on new commits. Configure here.

* test: update KNN query to use large_k and remove redundant checks

* revert unnecessary changes

(cherry picked from commit 8e2dd9b)
@meiravgri meiravgri requested a review from GuyAv46 September 29, 2025 04:06
@meiravgri meiravgri enabled auto-merge September 29, 2025 04:06
'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)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

@codecov
Copy link

codecov bot commented Sep 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.38%. Comparing base (b10d663) to head (6f47c25).
⚠️ Report is 2 commits behind head on 2.6.

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     
Flag Coverage Δ
flow 80.04% <ø> (-0.28%) ⬇️
unit 46.26% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@meiravgri meiravgri added this pull request to the merge queue Sep 29, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 29, 2025
@meiravgri meiravgri added this pull request to the merge queue Sep 29, 2025
Merged via the queue into 2.6 with commit bfd0ded Sep 29, 2025
14 checks passed
@meiravgri meiravgri deleted the backport-6904-to-2.6 branch September 29, 2025 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants