File tree Expand file tree Collapse file tree 1 file changed +5
-9
lines changed
Expand file tree Collapse file tree 1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change 1+ import signal
12import subprocess
23import sys
3- import time
44from dataclasses import dataclass , field
55from pathlib import Path
66from typing import Any
@@ -21,9 +21,9 @@ class ServerFixture:
2121 model : str = field (default = None )
2222
2323
24- def wait_for_server (url , timeout = 26 ):
24+ def wait_for_server (url , timeout = 10 ):
2525 session = requests .Session ()
26- session .mount ("http://" , HTTPAdapter (max_retries = Retry (total = 10 , backoff_factor = 0.1 )))
26+ session .mount ("http://" , HTTPAdapter (max_retries = Retry (total = 20 , backoff_factor = 0.05 )))
2727 session .get (url , timeout = timeout )
2828
2929
@@ -34,12 +34,8 @@ def start_proxy(config_path: str, port: int):
3434
3535
3636def stop_proxy (proc ):
37- proc .terminate ()
38- try :
39- proc .wait (timeout = 10 )
40- except subprocess .TimeoutExpired :
41- proc .kill ()
42- proc .wait (timeout = 5 )
37+ proc .send_signal (signal .SIGTERM )
38+ proc .wait ()
4339
4440
4541@pytest .fixture (scope = "session" )
You can’t perform that action at this time.
0 commit comments