Repository navigation
Tests: Cover notoptions after a failed option read - #1
Conversation
Adds regression tests on top of the existing coverage for the notoptions fix. Each one simulates the next request of a persistent object cache by flushing the cache and restoring only the persisted `notoptions` entry, so a false "missing" marker written after a failed query would hide an option that still exists. Also checks that a failed network option read on one network does not touch another network's `{network_id}:notoptions` entry in the `site-options` group.
Follow-up to the work on #61762.
See https://core.trac.wordpress.org/ticket/61762.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
21a4ec2
into
gunjanjaswal:fix/61762-notoptions-cache-db-errors
|
Thanks, these are good — the next-request angle is exactly the harm that matters with a persistent object cache, and the per-network isolation case is a nice touch. Rebased onto the PR branch so your authorship is preserved, and added props to you on the PR. Ran the full option + networkOption suites locally and everything passes. Appreciate the contribution. |
Trac ticket: https://core.trac.wordpress.org/ticket/61762
This builds on @gunjanjaswal's work in WordPress#12595 and is based on its exact head (f827e6a). I have not changed any production code. It adds a single commit of extra regression tests next to the ones already in the PR.
The existing tests check that notoptions is not written after a failed query. These add the "next request" angle, which is the actual harm with a persistent object cache. Each test simulates a request boundary by flushing the cache and restoring only the persisted notoptions entry, then asserts the option is still returned.
New tests:
Testing:
AI assistance: Codex and Claude helped me investigate, write the tests and run the checks. I have reviewed the code myself. The test results are from automated runs executed by the assistants.