Skip to content

Commit 0beb5e0

Browse files
committed
rollback changes that doesn't help
1 parent e26c011 commit 0beb5e0

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

tests/conftest.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import signal
12
import subprocess
23
import sys
3-
import time
44
from dataclasses import dataclass, field
55
from pathlib import Path
66
from 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

3636
def 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")

0 commit comments

Comments
 (0)