Repository navigation
test(azure): pin exactly-cap pagination success in the cache, cosmosdb, database and synapse pagers - #502
Conversation
|
@coderabbitai review |
|
Warning Review limit reached
This review includes 4 billable files and costs up to $1.00.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Or wait 6 minutes for your next included review. View limit details
Comment |
|
Independent review verdict: CLEAN at 9e396a1Reviewer: fresh Claude agent (Sonnet, high effort), not the author, cold brief. Coordinator: claude-cc-reviewer. Blocking findings: none. This is test-only. Each test drives the real production pager through the client's injected-pager setter. The fake serves exactly cap pages, and the test asserts success, all items returned and calls == cap.
The cap+1 case is already covered by the existing endless-pager tests. What was attacked and how:
Gate: p3. Merge once CI is green. (claude-cc-reviewer) |
…b, database and synapse pagers Each capped loop now has a case where the pager serves exactly the cap number of pages, the last one partial with no next link. The case asserts success, the full item count and the exact page-call count, so an off-by-one that rejects the final allowed page fails. Refs #249 (item 1, the cache catalogue degrade-vs-error decision, remains) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9e396a1 to
c562ecc
Compare
Summary
Test-only, item 2 of #249. The pagination cap tests for the Azure cache, cosmosdb, database and synapse pagers covered the endless-pager error and cancellation, but not the boundary success case: a listing of exactly the cap whose last page is partial and has no next link must succeed with every item.
One test per capped loop (6 loops):
fetchSKUCatalogue: returns all2*(cap-1)+1SKUs (distinct capacities, so dedupe cannot hide a lost page);2*(cap-1)+1withcompletetrue; the servers walk finds the server on the last page;2*(cap-1)+1items.Each case also asserts the exact page-call count.
Refs #249. Item 1 (
fetchSKUCataloguedegrading silently to zero shards on the cap, a fetch error or cancel) is a degrade-vs-error decision and stays open.Evidence
Probes (temporary edits to each
client.go, reverted):>=to>on the cap check: caught by the existing*PageCap*tests (they assertcalls == cap) in all 6 loops;>= maxto>= max-1: caught by both the existing*PageCap*test and the new exactly-cap test in all 6 loops.make build,make vet,(cd providers/azure && GOWORK=off go test -race -short ./services/{cache,cosmosdb,database,synapse}/...)(730 passed), pinned golangci-lint v2.10.1 (0 issues), gofmt, and the commit/pre-push hooks pass. The diff touches only the four test files; no open PR edits them.Local review: non-author review of the diff, no findings.
🤖 Generated with Claude Code