From 893b90177d7ed36fbe5b95960c4a72a0f1af96a2 Mon Sep 17 00:00:00 2001 From: Cindy Zhang Date: Fri, 8 Nov 2024 17:02:49 -0800 Subject: [PATCH] [serve] small test change (#48665) ## Why are these changes needed? Match for the more specific error that is raised, in this case `TypeError`, instead of matching for generic `RayTaskError`. --------- Signed-off-by: Cindy Zhang --- python/ray/serve/tests/test_batching.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/ray/serve/tests/test_batching.py b/python/ray/serve/tests/test_batching.py index b1e8b76d3e85..1c8f0b02ba66 100644 --- a/python/ray/serve/tests/test_batching.py +++ b/python/ray/serve/tests/test_batching.py @@ -7,7 +7,6 @@ import requests from starlette.responses import StreamingResponse -import ray from ray import serve @@ -51,7 +50,7 @@ async def __call__(self, request): # Set the max batch size. handle = serve.run(NoListReturned.bind()) - with pytest.raises(ray.exceptions.RayTaskError): + with pytest.raises(TypeError): assert handle.remote(1).result()