Skip to content

Commit c4ac396

Browse files
russellbYuqi Zhang
authored andcommitted
[CI] Fix race condition in test_kv_cache_events test (vllm-project#18169)
Signed-off-by: Russell Bryant <rbryant@redhat.com> Signed-off-by: Yuqi Zhang <yuqizhang@google.com>
1 parent e18b87d commit c4ac396

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

tests/v1/engine/test_engine_core_client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ def test_kv_cache_events(
292292
log_stats=False,
293293
)
294294
endpoint = publisher_config.endpoint.replace("*", "127.0.0.1")
295-
time.sleep(0.1)
296295
subscriber = MockSubscriber(endpoint,
297296
topic=publisher_config.topic,
298297
decode_type=KVEventBatch)

vllm/distributed/kv_events.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ def __init__(
130130
self._endpoint = endpoint
131131
self._replay_endpoint = replay_endpoint
132132
self._hwm = hwm
133+
self._socket_setup()
133134

134135
# Payload
135136
self._seq_gen = count()
@@ -207,7 +208,6 @@ def _socket_setup(self) -> None:
207208
def _publisher_thread(self) -> None:
208209
"""Background thread that processes the event queue."""
209210
self._pack = msgspec.msgpack.Encoder()
210-
self._socket_setup()
211211

212212
assert self._pub is not None # narrows type for mypy
213213

0 commit comments

Comments
 (0)