Make WordPress Core

Opened 6 years ago

Closed 5 years ago

Last modified 3 years ago

#44613 closed defect (bug) (fixed)

Reduce misleading test failures caused by HTTP timeouts

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 4.9.9 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords:
Focuses: Cc:

Description (last modified by SergeyBiryukov)

A number of HTTP external tests can randomly fail due to timeouts.

[34848] improved things a bit, however it only uses ::skipTestOnTimeout() in three tests, whereas there's a lot more tests with similar random timeouts from time to time.

Seems like ::skipTestOnTimeout() should be used in any HTTP test that can fail due to a timeout.

Another option is to only run these tests when HTTP-related changes were made.

Change History (12)

#1 @SergeyBiryukov
6 years ago

  • Description modified (diff)

#2 @SergeyBiryukov
6 years ago

In 43511:

Tests: Use WP_HTTP_UnitTestCase::skipTestOnTimeout() in more HTTP tests.

Adjust it to handle more types of timeouts, e.g. "Resolving timed out", "Connection timed out".

See #44613.

#3 @SergeyBiryukov
6 years ago

In 43512:

Tests: Introduce Tests_HTTP_Functions::skipTestOnTimeout(), mirroring the same WP_HTTP_UnitTestCase method.

See #44613.

#4 @SergeyBiryukov
6 years ago

  • Milestone changed from 5.0 to 4.9.9

#5 @SergeyBiryukov
6 years ago

In 43625:

Tests: Use WP_HTTP_UnitTestCase::skipTestOnTimeout() in more HTTP tests.

Adjust it to handle more types of timeouts, e.g. "Resolving timed out", "Connection timed out".

Merges [43511] to the 4.9 branch.
See #44613.

#6 @SergeyBiryukov
6 years ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 43626:

Tests: Introduce Tests_HTTP_Functions::skipTestOnTimeout(), mirroring the same WP_HTTP_UnitTestCase method.

Merges [43512] to the 4.9 branch.
Fixes #44613.

#7 @pento
5 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

This can be merged into the 5.0 branch.

#8 @SergeyBiryukov
5 years ago

In 43695:

Tests: Use WP_HTTP_UnitTestCase::skipTestOnTimeout() in more HTTP tests.

Adjust it to handle more types of timeouts, e.g. "Resolving timed out", "Connection timed out".

Merges [43511] to the 5.0 branch.
See #44613.

#9 @SergeyBiryukov
5 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

In 43696:

Tests: Introduce Tests_HTTP_Functions::skipTestOnTimeout(), mirroring the same WP_HTTP_UnitTestCase method.

Merges [43512] to the 5.0 branch.
Fixes #44613.

#10 @SergeyBiryukov
4 years ago

In 46682:

Tests: Skip test_readme() if the HTTP request to secure.php.net or dev.mysql.com failed on timeout.

Move skipTestOnTimeout() to WP_UnitTestCase_Base to avoid duplication.

See #44613.

#11 @SergeyBiryukov
4 years ago

In 46996:

Tests: In test_readme(), if the HTTP request to secure.php.net or dev.mysql.com failed, include response code in the error message.

See #40533, #44613.

This ticket was mentioned in Slack in #core by sergey. View the logs.


3 years ago

Note: See TracTickets for help on using tickets.