Heartbeat: Fix post lock detection race when wp_check_post_lock_window falls below the background heartbeat interval#11732
Conversation
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
|
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. |
|
Thanks for working on this @Sukhendu2002 — nice fix. To help land this, I drafted PHPUnit coverage for the new https://github.com/adamsilverstein/wordpress-develop/tree/trac-65171-tests The single test commit is: It adds three cases to
Locally: Feel free to fold these into this PR if you'd like — happy to push to your branch directly if that's easier. Let me know. |
Add coverage for the heartbeat setting exposed in [r/PR WordPress#11732]: - post_lock_window is set to the default 150 on post.php and post-new.php. - post_lock_window is omitted on non-post screens (index.php, edit.php). - post_lock_window reflects the wp_check_post_lock_window filter value. See #65171.
|
Thanks @adamsilverstein! I've cherry-picked your test commit into my branch. All tests passing. Appreciate the coverage! |
Trac ticket: https://core.trac.wordpress.org/ticket/65171
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.