Skip to content

[cosmos] Add spy-wire test coverage for ReadConsistencyStrategy on Query, ChangeFeed, and readManyByPartitionKeys paths #49370

Description

@jeet1995

Follow-up from PR #48787 review (comment 3352564257 by @kushagraThapar).

Current coverage

GatewayReadConsistencyStrategySpyWireTest validates point-read paths end-to-end through Gateway V1 (compute gateway) and Gateway V2 (thin client proxy), asserting both x-ms-consistency-level mapping and x-ms-read-consistency-strategy propagation, plus the dual-header invariant (x-ms-consistency-level is dropped when x-ms-read-consistency-strategy is non-Default).

Gap

Query, ChangeFeed, and readManyByPartitionKeys flow through distinct header-building paths in RxGatewayStoreModel and ThinClientStoreModel. The unit-level encode/decode tests in RntbdReadConsistencyStrategyHeaderTests cover the RNTBD frame, and the E2E GatewayReadConsistencyStrategyE2ETest matrix proves wire correctness against live accounts, but there is no in-process spy-wire test that asserts the outbound HTTP headers for these three operation types specifically.

Proposal

Extend GatewayReadConsistencyStrategySpyWireTest (or a sibling class) with parameterized cases for:

  • CosmosAsyncContainer.queryItems(...) (single-partition and cross-partition)
  • CosmosAsyncContainer.queryChangeFeed(...)
  • CosmosAsyncContainer.readMany(...) and CosmosAsyncContainer.readManyByPartitionKeys(...)

Each case should assert the same dual-header invariants the point-read tests assert today, across both V1 and V2.

Priority

Low — wire correctness for these paths is validated by the matrix (PR #48787 final validation: 360/360 PASS across 6 accounts and all consistency levels). This is hardening / regression-guard work, not a correctness gap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions