Skip to content

Commit

Permalink
[Frontend] Tests adjustments (vllm-project#9023)
Browse files Browse the repository at this point in the history
Signed-off-by: Wallas Santos <[email protected]>
  • Loading branch information
wallashss committed Oct 8, 2024
1 parent e72dd5f commit a45b4d2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/mq_llm_engine/test_error_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

MODEL = "google/gemma-1.1-2b-it"
ENGINE_ARGS = AsyncEngineArgs(model=MODEL)
RAISED_ERROR = MQEngineBatchError
RAISED_ERROR = KeyError
RAISED_VALUE = "foo"


Expand Down Expand Up @@ -60,7 +60,7 @@ async def test_evil_forward(tmp_socket):
await client.check_health()

# Throws an error in first forward pass.
with pytest.raises(RAISED_ERROR):
with pytest.raises(MQEngineBatchError):
async for _ in client.generate(prompt="Hello my name is",
sampling_params=SamplingParams(),
request_id=uuid.uuid4()):
Expand Down Expand Up @@ -164,7 +164,8 @@ async def test_failed_abort(tmp_socket):
sampling_params=SamplingParams(max_tokens=10),
request_id=uuid.uuid4()):
pass
assert "MQEngineBatchError" in repr(execinfo.value)

assert "KeyError" in repr(execinfo.value)
assert client.errored

# This should raise the original error.
Expand Down

0 comments on commit a45b4d2

Please sign in to comment.