[wp-trac] [WordPress Trac] #51669: Reduce misleading test failures caused by HTTP timeouts, take 2
WordPress Trac
noreply at wordpress.org
Sun Dec 27 23:50:02 UTC 2020
#51669: Reduce misleading test failures caused by HTTP timeouts, take 2
------------------------------+-----------------------------
Reporter: SergeyBiryukov | Owner: SergeyBiryukov
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 5.7
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch commit | Focuses:
------------------------------+-----------------------------
Changes (by SergeyBiryukov):
* keywords: => has-patch commit
Comment:
Replying to [comment:4 SergeyBiryukov]:
> Just noting that failures/errors in `WP_REST_Plugins_Controller_Test`
also occasionally happen on trunk too, as seen in
[https://github.com/WordPress/wordpress-develop/runs/1444055826 this run
on GitHub Actions] for example.
Looking at the stack trace, this is an issue similar to [49491] / #51670:
* The plugin installation tests added in [48242] / #50321 run
`WP_REST_Plugins_Controller::create_item()`.
* `WP_REST_Plugins_Controller::create_item()` runs
`Plugin_Upgrader::install()`.
* `Plugin_Upgrader::install()` runs the `upgrader_process_complete`
action.
* The action has these four functions attached to it via `wp-
admin/includes/admin-filters.php`:
* `add_action( 'upgrader_process_complete', array(
'Language_Pack_Upgrader', 'async_upgrade' ), 20 );`
* `add_action( 'upgrader_process_complete', 'wp_version_check', 10, 0 );`
* `add_action( 'upgrader_process_complete', 'wp_update_plugins', 10, 0
);`
* `add_action( 'upgrader_process_complete', 'wp_update_themes', 10, 0 );`
* [49491] / #51670 cancels the language pack updates using the
`async_update_translation` filter, but none of the other three functions
have a short-circuit like that.
* Ultimately, this causes external HTTP requests that are unnecessary for
plugin installation tests and interfer with the results in case of a
timeout.
[attachment:51669.diff] fixes the issue in my testing. This is consistent
with `WP_Automatic_Updater::run()` or
`Language_Pack_Upgrader::bulk_upgrade`, where these hooks are also removed
due to not being needed.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51669#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list