[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:
co-authored by
aoshen02
Claude Opus 5.5
parent
29773c722b
commit
e5f3d08d72
@@ -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"),
|
||||
]
|
||||
Reference in New Issue
Block a user