Adds query comparison tests for in-memory-emulator#4733
Open
FabianMeiswinkel wants to merge 15 commits into
Open
Adds query comparison tests for in-memory-emulator#4733FabianMeiswinkel wants to merge 15 commits into
FabianMeiswinkel wants to merge 15 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds query parity and topology tests for the Cosmos in-memory emulator.
Changes:
- Adds query result, plan, continuation, and partition-topology comparisons.
- Improves HPK prefix routing and query response metadata.
- Adds explicit EPK partition splitting for tests.
Show a summary per file
| File | Description |
|---|---|
azure_data_cosmos/tests/in_memory_emulator_tests/validation.rs |
Adds query header validation. |
azure_data_cosmos/tests/in_memory_emulator_tests/query_comparison.rs |
Adds query comparison scenarios. |
azure_data_cosmos/tests/in_memory_emulator_tests/mod.rs |
Registers the new tests. |
azure_data_cosmos_driver/tests/in_memory_emulator_tests/query.rs |
Expands query-plan assertions. |
azure_data_cosmos_driver/src/query/plan/mod.rs |
Supports leading HPK-prefix extraction. |
azure_data_cosmos_driver/src/in_memory_emulator/store.rs |
Supports explicit EPK splits. |
azure_data_cosmos_driver/src/in_memory_emulator/operations.rs |
Improves query plans and response headers. |
azure_data_cosmos_driver/src/driver/cosmos_driver.rs |
Exposes cached regions to comparison tests. |
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 3
- Review effort level: Medium
Member
Author
|
/azp run rust - cosmos - weekly |
|
Azure Pipelines failed to run 1 pipeline(s). |
Member
Author
|
/azp run rust - cosmos - weekly |
|
Azure Pipelines failed to run 1 pipeline(s). |
Member
Author
|
/azp run rust - cosmos - weekly |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run rust - cosmos - weekly |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run rust - cosmos - weekly |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run rust - cosmos - weekly |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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.
Summary
Adds broader Cosmos query comparison coverage for the Rust SDK in-memory emulator, including in-memory-only physical partition topology variations.
The new coverage validates that query results, resume paths, query plans, and physical partition targeting remain correct when:
Changes
Expanded query comparison seed data:
tenant-aAdded an in-memory-only query topology test:
query_results_match_across_physical_partition_topologiesAdded physical partition targeting validation using existing wire contracts:
/pkrangesresponses to determine expected physical rangesx-ms-documentdb-partitionkeyrangeidresponse headers to determine actual touched rangesAdded a test-only in-memory emulator split hook:
EmulatorStore::split_partition_at_epksplit_partitionbehavior remains midpoint-based and unchanged for existing callersPreserved live/external comparison behavior:
Validation
Live account comparison passed:
Local Cosmos emulator comparison passed against
https://127.0.0.1:8888:In-memory-only custom split topology coverage passed:
Focused driver query-plan and split coverage passed:
Clippy passed for the touched test targets: