-
Notifications
You must be signed in to change notification settings - Fork 842
Add test coverage for post stats cache handling improvements #46235
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
Co-authored-by: Copilot <[email protected]>
Co-authored-by: dognose24 <[email protected]>
Co-authored-by: dognose24 <[email protected]>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Proposed changes:
Adds comprehensive test coverage for the
refresh_post_stats_cache()method andfetch_post_stats()cache validation logic introduced in the parent PR. Tests cover critical edge cases where cached data can become invalid:Cache validation scenarios:
WP_Error handling:
cached_atkeyrefresh_post_stats_cache()returns directly as WP_Error objectCache lifecycle:
Other information:
Jetpack product discussion
#46211 (comment)
Does this pull request change what data or activity we track or use?
No.
Testing instructions:
Run the test suite:
Expected: All 37 tests pass (10 new tests for cache handling, 27 existing tests).
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.