tests : speed-up server test suite 3x (#26734)

* tests : speed-up test suite 3x

* cont : print 30 slowest tests
This commit is contained in:
Georgi Gerganov
2026-08-07 21:38:32 +03:00
committed by GitHub
parent 6de1b63473
commit 1621a3d388
4 changed files with 12 additions and 9 deletions
+5 -2
View File
@@ -306,6 +306,7 @@ class ServerProcess:
# wait for server to start
start_time = time.time()
last_print_time = start_time
while time.time() - start_time < timeout_seconds:
try:
response = self.make_request("GET", "/health", headers={
@@ -320,8 +321,10 @@ class ServerProcess:
if self.process.poll() is not None:
raise RuntimeError(f"Server process died with return code {self.process.returncode}")
print(f"Waiting for server to start...")
time.sleep(0.5)
if time.time() - last_print_time >= 1.0:
print(f"Waiting for server to start...")
last_print_time = time.time()
time.sleep(0.01)
raise TimeoutError(f"Server did not start within {timeout_seconds} seconds")
def stop(self) -> None: