-
Notifications
You must be signed in to change notification settings - Fork 186
tests: speed up tests #1130
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
tests: speed up tests #1130
Conversation
✅ Deploy Preview for poetic-froyo-8baba7 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughThe PR introduces a new boolean parameter Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
tests/test_qdrant_client.py (1)
2021-2022: Consider addingcheck_compatibility=Falsefor consistency.For consistency with the changes in
test_client_init()and to avoid an unnecessary compatibility check in this auxiliary REST client, consider:- rest_client = QdrantClient() + rest_client = QdrantClient(check_compatibility=False)This is a minor optimization since this client is only used for a quick cross-check when the main client uses gRPC.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
tests/test_qdrant_client.py(3 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
tests/test_qdrant_client.py (2)
qdrant_client/qdrant_client.py (1)
QdrantClient(27-2489)qdrant_client/qdrant_remote.py (1)
QdrantRemote(45-2665)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (8)
- GitHub Check: Redirect rules - poetic-froyo-8baba7
- GitHub Check: Header rules - poetic-froyo-8baba7
- GitHub Check: Pages changed - poetic-froyo-8baba7
- GitHub Check: Python 3.12.x on ubuntu-latest test
- GitHub Check: Python 3.13.x on ubuntu-latest test
- GitHub Check: Python 3.10.x on ubuntu-latest test
- GitHub Check: Python 3.11.x on ubuntu-latest test
- GitHub Check: Python 3.9.x on ubuntu-latest test
🔇 Additional comments (2)
tests/test_qdrant_client.py (2)
106-242: LGTM! Appropriate use ofcheck_compatibility=Falsein initialization tests.The changes correctly add
check_compatibility=Falseto all remote client instantiations intest_client_init(). This is appropriate because:
- This test focuses on verifying URL parsing, prefix handling, and connection parameter setup—not compatibility checking logic
- Local clients (
:memory:, path-based) correctly omit the flag since they don't perform compatibility checks- The pattern is consistently applied across all remote client test cases
- The speed improvement (20s → 0.3s per the PR description) is significant for developer productivity
1822-1826: LGTM! Enhanced test coverage for auth token provider.These additions improve test coverage by explicitly verifying auth token provider behavior both with and without compatibility checks. The test correctly validates that:
- Without
check_compatibility=False: token provider is called during init for the compatibility check, then again forget_collections()(starting at "token_1")- With
check_compatibility=False: token provider is only called forget_collections()(starting at "token_0")This makes the test more comprehensive and less brittle to implementation changes.
Also applies to: 1844-1850
…nd methods as non-applicable for sparse
* debug: add durations=0 to pytest * debug: test only test query group * debug: try adding payload indexes to query group test * rollback test launch
* fix: do not try to check compatibility in test_client_init * tests: remove sparse-code vectors (10_000 dim), remove euclid recommend methods as non-applicable for sparse * tests: add payload indexes to query group test * debug: add durations=0 to pytest * debug: test only test query group * debug: try adding payload indexes to query group test * rollback test launch
on my machine results:
etc.
current overall improvements for
tests/integration_test.shondevimage:5 min 58s -> 4 min 22s
python3.10 in CI 14min -> 10min 34s