Skip to content

Commit

Permalink
try to force it down in windows
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Nov 23, 2023
1 parent 384a95d commit 679ac97
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tests/test_proxy_functional.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# type: ignore
import asyncio
import contextlib
import functools
import os
import pathlib
Expand Down Expand Up @@ -109,7 +110,12 @@ def _make_process() -> subprocess.Popen:
port=int(port),
)
proc.terminate()
await loop.run_in_executor(None, proc.communicate)
with contextlib.suppress(subprocess.TimeoutExpired):
await loop.run_in_executor(
None, functools.partial(proc.communicate, timeout=0.5)
)
proc.kill()
await loop.run_in_executor(None, functools.partial(proc.communicate, timeout=1))


@pytest.fixture
Expand Down

0 comments on commit 679ac97

Please sign in to comment.