Skip to content

Fix test for deferred indexing queue processing#602

Merged
mauritsvanrees merged 3 commits intomainfrom
fix-test-deferred-indexing-queue
Mar 24, 2026
Merged

Fix test for deferred indexing queue processing#602
mauritsvanrees merged 3 commits intomainfrom
fix-test-deferred-indexing-queue

Conversation

@jensens
Copy link
Member

@jensens jensens commented Mar 23, 2026

Summary

  • Since Products.CMFCore 3.9, reindexObjectSecurity no longer calls processQueue() mid-request (Update user.py #155)
  • test_create_raises_unicodedecodeerror relied on the queue being flushed synchronously during api.content.create()
  • Add explicit processQueue() call inside the assertRaises block so the broken indexer is invoked

Refs: plone/buildout.coredev#1080, zopefoundation/Products.CMFCore#160

🤖 Generated with Claude Code


📚 Documentation preview 📚: https://ploneapi--602.org.readthedocs.build/

Since Products.CMFCore 3.9, reindexObjectSecurity no longer calls
processQueue() mid-request. The indexing queue may defer catalog
operations until the next search or transaction commit.

Adapt test_create_raises_unicodedecodeerror to explicitly flush the
queue so the broken indexer is invoked inside the assertRaises block.

Refs: plone/buildout.coredev#1080
@mister-roboto
Copy link

@jensens thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

@jensens
Copy link
Member Author

jensens commented Mar 23, 2026

@jenkins-plone-org please run jobs

@jensens
Copy link
Member Author

jensens commented Mar 23, 2026

@jenkins-plone-org please run jobs

Copy link
Member

@mauritsvanrees mauritsvanrees left a comment

Choose a reason for hiding this comment

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

This helps when using latest Products.CMFCore. Thanks!

@mauritsvanrees mauritsvanrees merged commit cbecf68 into main Mar 24, 2026
13 checks passed
@mauritsvanrees mauritsvanrees deleted the fix-test-deferred-indexing-queue branch March 24, 2026 15:55
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.

3 participants