WordPress.org

Make WordPress Core

Opened 4 months ago

Last modified 6 days ago

#51669 reopened defect (bug)

Reduce misleading test failures caused by HTTP timeouts, take 2 — at Initial Version

Reported by: SergeyBiryukov Owned by:
Milestone: 5.8 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch
Focuses: Cc:

Description

Background: #44613.

During the 5.5.2 release and subsequent backports all the way to the 3.7 branch, there were quite a few test failures caused by HTTP timeouts. Some examples of these, collected by @desrosj:

1) Tests_HTTP_curl::test_redirect_on_head
Connection timed out after 5001 milliseconds
Failed asserting that WP_Error Object (...) is not an instance of class "WP_Error".

1) Tests_HTTP_curl::test_redirect_on_head
Failed asserting that true is false.

1) Tests_HTTP_curl::test_redirect_on_302
Failed asserting that true is false.

1) Tests_HTTP_Functions::test_get_response_cookies
Failed asserting that an array is not empty.

1) Tests_HTTP_streams::test_redirect_on_301
stream_socket_client(): unable to connect to tcp://api.wordpress.org:80 (Connection timed out)

1) Tests_HTTP_streams::test_no_head_redirections
cURL error 28: Connection timed out after 5000 milliseconds
Failed asserting that WP_Error Object (...) is not an instance of class "WP_Error".

These are already fixed in 4.9 or later branches by [43511], [43512], [46682], and [46996]. These changes should be backported to earlier branches too.

There were, however, some other failures in the REST API plugin controller tests:

1) WP_REST_Plugins_Controller_Test::test_create_item_and_activate_errors_if_no_permission_to_activate_plugin
An unexpected error occurred. Something may be wrong with WordPress.org or this server&#8217;s configuration. If you continue to have problems, please try the <a href="https://wordpress.org/support/forums/">support forums</a>. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)

1) WP_REST_Plugins_Controller_Test::test_create_item_and_network_activate
Download failed.
Failed asserting that WP_Error Object (...) is not an instance of class "WP_Error".

These tests are not in the external-http group. Looking closer, they appear to set up the plugin download to come locally instead of downloading it from WordPress.org, so it's not quite clear why they still attempt to connect to WordPress.org. This will need more investigation.

Change History (0)

Note: See TracTickets for help on using tickets.