Fix e2e tests

This commit is contained in:
Roman Meshko
2026-05-15 12:45:18 +03:00
parent 2eb5b5d8ad
commit 255ec36f8a
3 changed files with 11 additions and 3 deletions
+4 -3
View File
@@ -249,7 +249,7 @@ def _health(http_client):
def _health_ai_active(data: dict) -> bool:
return data.get("aiAvailability") not in ("None", "Downloading", "Error")
return data.get("aiAvailability") == "Enabled"
def _wait_for_ai_active(http_client, timeout: float = 30) -> dict | None:
@@ -324,7 +324,8 @@ def corrupt_image():
@pytest.fixture(scope="module")
def warm_engine(http_client, image_small, auth_headers):
deadline = time.time() + 120
timeout = int(os.environ.get("E2E_ENGINE_WAIT_TIMEOUT", "900"))
deadline = time.time() + timeout
last_status = None
consecutive_errors = 0
@@ -403,4 +404,4 @@ def warm_engine(http_client, image_small, auth_headers):
th.join(timeout=1)
time.sleep(2)
pytest.fail(f"engine warm-up timed out after 120s (last status: {last_status})")
pytest.fail(f"engine warm-up timed out after {timeout}s (last status: {last_status})")