test(user_ldap): speed up AbstractMappingTestCase chunking test#60756
Open
miaulalala wants to merge 1 commit into
Open
test(user_ldap): speed up AbstractMappingTestCase chunking test#60756miaulalala wants to merge 1 commit into
miaulalala wants to merge 1 commit into
Conversation
2 tasks
There was a problem hiding this comment.
Pull request overview
Speeds up the LDAP mapping chunking test by drastically reducing the number of DB inserts while still exercising the getListOfIdsByDn() query chunking path.
Changes:
- Map only every 5000th DN (instead of every 20th) to reduce inserts from thousands to a handful.
- Update the explanatory loop comment for why the DN list size triggers chunking behavior.
- Adjust the assertion to match the new number of mapped entries returned.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bf3982e to
40456ae
Compare
Contributor
Author
|
/backport to stable34 |
blizzz
reviewed
May 27, 2026
Member
blizzz
left a comment
There was a problem hiding this comment.
technical detail, we can stay accurate. Would keep Postgres as reference as well actually.
Reduce mapped entries from 3332 to 14 (every 5000th instead of every 20th) so the test exercises the chunking path without inserting thousands of rows. Move the explanatory comment above the loop where it belongs. Note: the implementation chunks at its own 65000 total-parameter limit (not Postgres's 65535 IN-list limit), so the comment uses 65000. Signed-off-by: Anna Larch <anna@nextcloud.com> AI-Assisted-By: Claude Sonnet 4.6 <noreply@anthropic.com>
bc5a7ab to
20d8540
Compare
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.
Summary
testGetListOfIdsByDntest mapped a DN every 20 entries across 66k entries, producing 3332 DB inserts just to exercise query chunking behaviourSplit out from #60739 at reviewer request.
Test plan
NOCOVERAGE=1 ./autotest.sh sqlite apps/user_ldap/tests/Mapping/passes66640 / 5000rounded = 13, plus index 0 = 14)🤖 Generated with Claude Code