Skip to content

test: add edge case tests for view pager boundary check - #7

Open
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1787152923-pagination-edge-test
Open

test: add edge case tests for view pager boundary check#7
devin-ai-integration[bot] wants to merge 1 commit into
mainfrom
devin/1787152923-pagination-edge-test

Conversation

@devin-ai-integration

Copy link
Copy Markdown

PR summary

Adds edge case unit tests for pagination covering the real _ViewBasePageIterator.check_boundary logic, which was previously only exercised via mocked boundary functions in test_pagination_key.py. New TestViewPagerBoundary class (using a real POST_VIEW pager via Pagination.new_pagination):

  • test_boundary_identical_key_and_id_raises: a page boundary with identical view keys AND document IDs raises Cannot 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 with start_key/start_key_doc_id boundary options.

PR Checklist

Please make sure that your PR fulfills the following requirements:

  • The commit message follows the
    Angular Commit Message Guidelines.
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • New tests
  • Build/CI related changes
  • Documentation content changes
  • Other (please describe)

What is the current behavior?

The view pager duplicate-boundary error path (check_boundary in _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?

  • Yes
  • No

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

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@laveresteban laveresteban self-assigned this Aug 19, 2026
@devin-ai-integration

Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant