-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-introduce pytest-xdist
in supported envs
#5431
base: master
Are you sure you want to change the base?
Conversation
7ed6246
to
392ebbb
Compare
392ebbb
to
edec305
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5431 +/- ##
==========================================
- Coverage 97.62% 97.17% -0.46%
==========================================
Files 107 41 -66
Lines 33066 8860 -24206
Branches 3873 1424 -2449
==========================================
- Hits 32282 8610 -23672
+ Misses 567 133 -434
+ Partials 217 117 -100
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
7dd330f
to
18dd594
Compare
18dd594
to
c4eab87
Compare
ef79513
to
e1f51b9
Compare
9cc0f30
to
93dc6bd
Compare
26d0b16
to
763a477
Compare
b6a6440
to
1989754
Compare
@Dreamsorcerer @bdraco any ideas why the http parser tests might be failing in with pytest-xdist? |
Attempting to fix the Ubuntu failure in #8391. |
This reverts commit 1989754.
It's apparently not being set in the suprocesses that `pytest-xdist` spawns otherwise.
for more information, see https://pre-commit.ci
83b8706
to
f0b5c96
Compare
Oh, nice! Thanks for confirming that those are not related to this patch! |
@Dreamsorcerer looks like there's even more flakiness coming out with the parallelism now, eh? |
@bdraco could you check https://github.com/aio-libs/aiohttp/actions/runs/8887163170/job/24401975076#step:11:8577 ? I think you were the last one to dig into the proxy tests, right? From the log ERROR tests/test_proxy_functional.py::test_secure_https_proxy_absolute_path[pyloop-http] - pytest.PytestUnraisableExceptionWarning: Exception ignored in: <socket.socket fd=-1, family=2, type=1, proto=6>
Traceback (most recent call last):
File "/home/runner/work/aiohttp/aiohttp/aiohttp/test_utils.py", line 481, in teardown_test_loop
gc.collect()
ResourceWarning: unclosed <socket.socket fd=21, family=2, type=1, proto=6, laddr=('127.0.0.1', 58090), raddr=('127.0.0.1', 39771)> it seems like there might be a live connection hanging around post-test.. WDYT? |
What do these changes do?
This change resurrects parallel test execution in most of the test envs. On my laptop, the full test run is almost 3x faster: 36.04s vs 105.53s (0:01:45).
Refs:
pytest-xdist
breaks asyncio-based code expecting to be run in the main thread pytest-dev/pytest-xdist#620Are there changes in behavior for the user?
Nope.
Related issue number
#3419 + #3450
Checklist
CONTRIBUTORS.txt
CHANGES
folder<issue_id>.<type>
for example (588.bugfix)issue_id
change it to the pr id after creating the pr.feature
: Signifying a new feature..bugfix
: Signifying a bug fix..doc
: Signifying a documentation improvement..removal
: Signifying a deprecation or removal of public API..misc
: A ticket has been closed, but it is not of interest to users.