Opened 5 weeks ago
Last modified 4 weeks ago
#65064 new defect (bug)
Flaky test: test_get_theme_featured_list_api fails with external HTTP unavailability
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | trunk |
| Component: | Build/Test Tools | Keywords: | has-test-info has-patch has-unit-tests |
| Focuses: | tests | Cc: |
Description
The test file: tests/phpunit/tests/admin/includesTheme.php::test_get_theme_featured_list_api
Error message about WordPress.org API unavailability
That it's marked with @group external-http
Reference job ID: 70948707430
Your suggested fix (mock the API or skip gracefully)
Change History (2)
This ticket was mentioned in PR #11556 on WordPress/wordpress-develop by @sukhendu2002.
5 weeks ago
#1
- Keywords has-patch has-unit-tests added
#2
@
4 weeks ago
Hi there, thanks for the ticket!
Just noting that this previously came up in comment:18:ticket:54420.
The test was added in [39906] / #28121 to make sure that the list of theme features pulled from the WordPress.org API returns the expected data structure. It seems that mocking this response might defeat the purpose of the test, as it was specifically written to protect from unexpected changes in the WordPress.org API response.
…ilable
Trac ticket: https://core.trac.wordpress.org/ticket/65064