Skip to content

Commit

Permalink
Jetpack Debug: Do not fail if WP.com SELF test times outs.
Browse files Browse the repository at this point in the history
  • Loading branch information
kraftbj committed Sep 24, 2019
1 parent d52a0f3 commit f93d282
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion _inc/lib/debugger/class-jetpack-cxn-tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ protected function test__server_port_value() {
*
* Intentionally added last as it will be skipped if any local failed conditions exist.
*
* @since 7.1.0
* @since 7.9.0 Timeout waiting for a WP.com response no longer fails the test. Test is marked skipped instead.
*
* @return array Test results.
*/
protected function last__wpcom_self_test() {
Expand All @@ -339,8 +342,10 @@ protected function last__wpcom_self_test() {

if ( 200 === wp_remote_retrieve_response_code( $response ) ) {
return self::passing_test( $name );
} elseif ( is_wp_error( $response ) && false !== strpos( $response->get_error_message(), 'cURL error 28' ) ) { // Timeout.
return self::skipped_test( $name, __( 'The test timed out which may sometimes indicate a failure or may be a false failure.', 'jetpack' ) );
} else {
return self::failing_test( $name, __( 'Jetpack.com detected an error.', 'jetpack' ), __( 'Visit the Jetpack.com debugging page for more information or contact support.', 'jetpack' ) ); // @todo direct links.
return self::failing_test( $name, __( 'Jetpack.com detected an error on the WPcom Self Test.', 'jetpack' ), __( 'Visit the Jetpack.com debugging page for more information or contact support.', 'jetpack' ) ); // @todo direct links.
}
}
}

0 comments on commit f93d282

Please sign in to comment.