Skip to content

Add batch stream tests and a cross-API paging equivalence suite - #16

Merged
michaelstaib merged 4 commits into
mst/ef-paging-batch-streampagefrom
mst/tests-batch-streampage
Oct 4, 2026
Merged

michaelstaib merged 4 commits into
mst/ef-paging-batch-streampagefrom
mst/tests-batch-streampage

Conversation

@michaelstaib

Copy link
Copy Markdown
Owner

This adds the batch stream tests and a cross-API equivalence suite. PagingEquivalenceTests runs the same paging arguments through ToPageAsync and ToStreamPageAsync, and through ToBatchPageAsync and ToBatchStreamPageAsync per key, and compares items, cursors, flags, index and total count directly between the APIs, with cursors taken from real pages rather than written by hand. A new DataLoader test branches a real stream DataLoader, fetches through it, checks the branch state, and shows that branches differing only in IncludeTotalCount, EnableRelativeCursors or NullOrdering get different keys. Stream test cases that still carried ToPageAsync in their names are renamed, and their snapshot files move with them; only the snapshot header line that holds the test name changes.

One known gap: for a backward relative cursor without a requested total count, ToBatchStreamPageAsync reports different page flags than ToBatchPageAsync. Those two scenarios are left out of the suite here and come back with the fix in the next PR.

Stack: sits on #15 (mst/dataloader-branch-key-options).

Copilot AI balanced review requested due to automatic review settings September 29, 2026 13:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@michaelstaib
michaelstaib added this pull request to stack #18 October 4, 2026 17:32
@michaelstaib
michaelstaib force-pushed the mst/tests-batch-streampage branch 2 times, most recently from a670a93 to 69bb36b Compare October 4, 2026 17:33
Base automatically changed from mst/dataloader-branch-key-options to mst/ef-paging-batch-streampage October 4, 2026 17:37
@michaelstaib
michaelstaib force-pushed the mst/tests-batch-streampage branch from 69bb36b to 7de1e4d Compare October 4, 2026 17:38
@michaelstaib
michaelstaib merged commit 11678bb into mst/ef-paging-batch-streampage Oct 4, 2026
1 check passed
michaelstaib added a commit that referenced this pull request Oct 4, 2026
* Add cross-API paging equivalence and DataLoader streaming tests

* Add relative offset and backward relative scenarios to the paging equivalence suite

* Add fetch-based branch state tests for the stream paging DataLoader extensions

* Rename StreamPage test cases to name ToStreamPageAsync
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants