[wp-trac] [WordPress Trac] #51669: Reduce misleading test failures caused by HTTP timeouts, take 2

WordPress Trac noreply at wordpress.org
Fri Oct 30 00:58:16 UTC 2020


#51669: Reduce misleading test failures caused by HTTP timeouts, take 2
------------------------------+--------------------
 Reporter:  SergeyBiryukov    |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  5.6
Component:  Build/Test Tools  |    Version:
 Severity:  normal            |   Keywords:
  Focuses:                    |
------------------------------+--------------------
 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’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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/51669>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list