Merge pull request #1943 from ogayot/curl-timeout

tests: terminate curl processes on timeout
This commit is contained in:
Olivier Gayot 2024-03-19 09:59:57 +01:00 committed by GitHub
commit cc15d645f4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -39,6 +39,8 @@ async def test_connect(cmd: List[str]) -> bool:
try:
await asyncio.wait_for(proc.wait(), 10)
except asyncio.TimeoutError:
proc.terminate()
await proc.wait()
return False
return proc.returncode == 0