Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions tests/unit/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,12 @@ async def proxy(proxy_info: ProxyInfo) -> AsyncGenerator[ProxyInfo, None]:
str(proxy_info.port),
'--basic-auth',
f'{proxy_info.username}:{proxy_info.password}',
# Without this, `Proxy` spawns one acceptor and one executor process per CPU core, which is
# unnecessary for a single-test proxy and crashes xdist workers under parallel CI load.
'--num-workers',
'1',
'--num-acceptors',
'1',
]
):
yield proxy_info
Expand All @@ -144,6 +150,10 @@ async def disabled_proxy(proxy_info: ProxyInfo) -> AsyncGenerator[ProxyInfo, Non
'--basic-auth',
f'{proxy_info.username}:{proxy_info.password}',
'--disable-http-proxy',
'--num-workers',
'1',
'--num-acceptors',
'1',
]
):
yield proxy_info
Expand Down
Loading