test(spanner): add mock server tests for location-aware routing - #6465
test(spanner): add mock server tests for location-aware routing#6465olavloite wants to merge 3 commits into
Conversation
Adds an extensive test set using a mock Spanner server to verify that location-aware routing is behaving as expected. This test suite is not only intended to verify the current behavior, but also to guard against accidental regressions in the future.
There was a problem hiding this comment.
Code Review
This pull request adds a comprehensive suite of mock server integration tests (mock_tests.rs) to verify Spanner's location-aware routing and multi-server topologies, and registers the new module in mod.rs. The review feedback consistently points out violations of the repository style guide regarding error handling in tests, specifically recommending the use of the ? operator instead of .expect() across various helper functions and test cases to propagate errors cleanly.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a comprehensive suite of mock server integration tests in src/spanner/src/routing/mock_tests.rs to verify Spanner's location-aware routing and multi-server topologies. The tests cover inline cache updates, direct multi-server routing, replica selection, cooldown/failover behaviors, dynamic range updates, transaction affinity isolation, and proactive background cache synchronization. Additionally, the new test module is registered in src/spanner/src/routing/mod.rs. I have no further feedback to provide.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6465 +/- ##
==========================================
- Coverage 96.37% 96.36% -0.01%
==========================================
Files 297 297
Lines 84017 84017
==========================================
- Hits 80971 80967 -4
- Misses 3046 3050 +4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Adds an extensive test set using a mock Spanner server to verify that location-aware routing is behaving as expected. This test suite is not only intended to verify the current behavior, but also to guard against accidental regressions in the future.