- Timestamp:
- 01/30/2021 01:02:18 PM (6 years ago)
- Location:
- branches/5.2
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tests/phpunit/includes/abstract-testcase.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/5.2
- Property svn:mergeinfo changed
/trunk merged: 46682,46996
- Property svn:mergeinfo changed
-
branches/5.2/tests/phpunit/includes/abstract-testcase.php
r44966 r50093 190 190 191 191 /** 192 * Allow tests to be skipped on some automated runs 192 * Allow tests to be skipped on some automated runs. 193 193 * 194 194 * For test runs on Travis for something other than trunk/master … … 230 230 $this->markTestSkipped( 'Test does not run on Multisite' ); 231 231 } 232 } 233 234 /** 235 * Allow tests to be skipped if the HTTP request times out. 236 * 237 * @param array|WP_Error $response HTTP response. 238 */ 239 public function skipTestOnTimeout( $response ) { 240 if ( ! is_wp_error( $response ) ) { 241 return; 242 } 243 if ( 'connect() timed out!' === $response->get_error_message() ) { 244 $this->markTestSkipped( 'HTTP timeout' ); 245 } 246 247 if ( false !== strpos( $response->get_error_message(), 'timed out after' ) ) { 248 $this->markTestSkipped( 'HTTP timeout' ); 249 } 250 251 if ( 0 === strpos( $response->get_error_message(), 'stream_socket_client(): unable to connect to tcp://s.w.org:80' ) ) { 252 $this->markTestSkipped( 'HTTP timeout' ); 253 } 254 232 255 } 233 256
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)