#62325 closed defect (bug) (fixed)
Ensure PHPUnit tests making network requests are in the external-http group.
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | has-patch has-unit-tests commit |
Focuses: | Cc: |
Description
A number of tests in the PHPUnit test suite make network requests to ensure that features such as oembeds, DNS lookups and remote requests work as intended.
As these tests can be slow and are susceptible to failure in un-ideal network conditions, they ought to be in the external-http
group to prevent false negatives when the developers run the test suite locally, especially within a virtual environment.
Some of these tests are missing the group, the purpose of this test is to review the test suite and ensure they are all in the external-http
group.
cc @azaozz per discussion on PR#7655.
Change History (11)
#4
@
5 months ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 6.8
Thanks for opening this ticket!
these tests can be slow and are susceptible to failure in un-ideal network conditions
Yep, thinking that fixing the group will be a nice improvement for most people that run the unit tests locally (the tests can be run with --exclude-group external-http
when network connection is slow). Would probably be good to also add a reminder/docs to maintain that group when new tests are added.
Seems this can be done in 6.8. May also be a good-first-bug, perhaps.
This ticket was mentioned in PR #8074 on WordPress/wordpress-develop by @sukhendu2002.
3 months ago
#5
- Keywords has-patch has-unit-tests added; needs-patch removed
Trac ticket: https://core.trac.wordpress.org/ticket/62325
This ticket was mentioned in Slack in #core by audrasjb. View the logs.
13 days ago
@audrasjb commented on PR #8074:
13 days ago
#7
Hey @peterwilsoncc, as per today's scrub, I'm adding you for review ;)
@sukhendu2002 commented on PR #8074:
10 days ago
#8
Hi @peterwilsoncc, Thanks for the feedback! I've made the changes accordingly.
#9
follow-up:
↓ 11
@
9 days ago
- Keywords commit added
I've approved the pull request associated with this ticket, I think it's ready for commit.
Yep, thinking that fixing the group will be a nice improvement for most people that run the unit tests locally (the tests can be run with --exclude-group external-http when network connection is slow).
@azaozz By default the group is excluded for local test runs, so once I commit the PR running the local test suite should avoid failures caused by network errors.
#10
@
9 days ago
- Owner set to peterwilsoncc
- Resolution set to fixed
- Status changed from new to closed
In 59964:
#11
in reply to:
↑ 9
@
6 days ago
Replying to peterwilsoncc:
By default the group is excluded for local test runs
Ah, I see. Sounds good, thanks!
In 59326: