Open-source inference server and production cluster for all the models your agent needs.
Python bgecolbertdata-pipelinedeep-learningembeddingsinferenceinference-serverinformation-retrievalllmmlmlopsnatural-language-processingnlppythonrerankingretrievalretrieval-augmented-generationsemantic-searchspladevector-search
test(server): keep WebSocket status polling paced (#764)
Krisztian Gajdarf494e702a7b8
diff --git a/packages/sie_server/tests/api/test_ws.py b/packages/sie_server/tests/api/test_ws.pyindex bb3194e4e..687b27a44 100644--- a/packages/sie_server/tests/api/test_ws.py+++ b/packages/sie_server/tests/api/test_ws.py@@ -4,7 +4,6 @@ import tempfilefrom collections.abc import Generatorfrom importlib.metadata import versionfrom pathlib import Path-from unittest.mock import AsyncMock, patchimport pytestfrom fastapi.testclient import TestClient@@ -195,9 +194,10 @@ class TestWebSocketEndpoint:assert server["working_dir"] == ""assert server["pid"] == 0- @patch("sie_server.api.ws.asyncio.sleep", new_callable=AsyncMock)- def test_websocket_sends_multiple_updates(self, mock_sleep: AsyncMock, client: TestClient) -> None:+ def test_websocket_sends_multiple_updates(self, client: TestClient) -> None:"""WebSocket sends multiple status updates."""+ # Keep the real interval: a no-op sleep floods the client's unbounded+ # message queue and retains every call in the mock, risking CI OOMs.with client.websocket_connect("/ws/status") as websocket:# Receive two messagesdata1 = websocket.receive_json()@@ -209,7 +209,6 @@ class TestWebSocketEndpoint:# Second timestamp should be >= firstassert data2["timestamp"] >= data1["timestamp"]- mock_sleep.assert_called()def test_websocket_gpus_is_list(self, client: TestClient) -> None:"""GPUs field is always a list."""