test: add edge case tests for view pager boundary check - #7
Open
devin-ai-integration[bot] wants to merge 1 commit into
Open
test: add edge case tests for view pager boundary check#7devin-ai-integration[bot] wants to merge 1 commit into
devin-ai-integration[bot] wants to merge 1 commit into
Conversation
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
PR summary
Adds edge case unit tests for pagination covering the real
_ViewBasePageIterator.check_boundarylogic, which was previously only exercised via mocked boundary functions intest_pagination_key.py. NewTestViewPagerBoundaryclass (using a realPOST_VIEWpager viaPagination.new_pagination):test_boundary_identical_key_and_id_raises: a page boundary with identical view keys AND document IDs raisesCannot paginate on a boundary containing identical keys ... and document IDs ...on the next page request.test_boundary_identical_key_different_id_paginates: identical keys with different doc IDs paginate correctly, resuming withstart_key/start_key_doc_idboundary options.PR Checklist
Please make sure that your PR fulfills the following requirements:
Angular Commit Message Guidelines.
PR Type
What is the current behavior?
The view pager duplicate-boundary error path (
check_boundaryin_ViewBasePageIterator) is not covered by any unit test; existing key pager tests use a mocked boundary function.What is the new behavior?
No behavior change — test-only. Both the failing boundary (same key + same ID) and the valid boundary (same key, different ID) edge cases are now covered against the real view pager.
Does this PR introduce a breaking change?
Other information
All unit tests pass (
python -m pytest test/unit: 686 passed, 616 subtests) and pylint is 10.00/10.Link to Devin session: https://app.devin.ai/sessions/e56da993489d48cfa1f13639d1d84fd9
Requested by: @eml2026