[Frontend][RL] Align sleep-mode API responses and operation metrics (#52864)

Signed-off-by: Ronald1995 <ronaldautomobile@163.com>
Signed-off-by: aoshen02 <aoshen02@users.noreply.github.com>
Co-authored-by: aoshen02 <aoshen02@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ronald
2026-09-29 23:16:38 -07:00
committed by GitHub
co-authored by aoshen02 Claude Opus 5.5
parent 29773c722b
commit e5f3d08d72
14 changed files with 834 additions and 48 deletions
+32
View File
@@ -0,0 +1,32 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
from unittest.mock import AsyncMock, call
import pytest
from vllm.v1.engine.core_client import DPLBAsyncMPClient
pytestmark = pytest.mark.cpu_test
@pytest.mark.asyncio
@pytest.mark.parametrize(
"results, expected",
[
([True, True], True),
([True, False], False),
([False, True], False),
([False, False], False),
],
)
async def test_dp_wake_up_requires_all_engines_awake(results, expected):
client = object.__new__(DPLBAsyncMPClient)
client.core_engines = [b"engine-0", b"engine-1"]
client._call_utility_async = AsyncMock(side_effect=results)
assert await client.wake_up_async(["weights"]) is expected
assert client._call_utility_async.await_args_list == [
call("wake_up", ["weights"], engine=b"engine-0"),
call("wake_up", ["weights"], engine=b"engine-1"),
]