WordPress.org

Make WordPress Core

Opened 20 months ago

Closed 17 months ago

Last modified 2 months ago

#44613 closed defect (bug) (fixed)

Reduce misleading test failures caused by HTTP timeouts

Reported by: SergeyBiryukov Owned by: 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 (11)

#1 @SergeyBiryukov
20 months ago

  • Description modified (diff)

#2 @SergeyBiryukov
20 months 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
20 months ago

In 43512:

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

See #44613.

#4 @SergeyBiryukov
18 months ago

  • Milestone changed from 5.0 to 4.9.9

#5 @SergeyBiryukov
18 months 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
18 months 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
17 months ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

This can be merged into the 5.0 branch.

#8 @SergeyBiryukov
17 months 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
17 months 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 months 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
2 months 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.

Note: See TracTickets for help on using tickets.