diff --git a/tests/v1/engine/test_engine_core_client.py b/tests/v1/engine/test_engine_core_client.py index 452fe1e37e2c..8bea032f656f 100644 --- a/tests/v1/engine/test_engine_core_client.py +++ b/tests/v1/engine/test_engine_core_client.py @@ -290,7 +290,6 @@ def test_kv_cache_events( log_stats=False, ) endpoint = publisher_config.endpoint.replace("*", "127.0.0.1") - time.sleep(0.1) subscriber = MockSubscriber(endpoint, topic=publisher_config.topic, decode_type=KVEventBatch) diff --git a/vllm/distributed/kv_events.py b/vllm/distributed/kv_events.py index 1141a8e53c3b..29c6a70c4d26 100644 --- a/vllm/distributed/kv_events.py +++ b/vllm/distributed/kv_events.py @@ -130,6 +130,7 @@ def __init__( self._endpoint = endpoint self._replay_endpoint = replay_endpoint self._hwm = hwm + self._socket_setup() # Payload self._seq_gen = count() @@ -207,7 +208,6 @@ def _socket_setup(self) -> None: def _publisher_thread(self) -> None: """Background thread that processes the event queue.""" self._pack = msgspec.msgpack.Encoder() - self._socket_setup() assert self._pub is not None # narrows type for mypy