From 507a92f412d209c00bf6249dfd8fc59087665ff4 Mon Sep 17 00:00:00 2001 From: Edward Oakes Date: Mon, 19 Jun 2023 17:16:24 -0500 Subject: [PATCH 1/2] fix Signed-off-by: Edward Oakes --- python/ray/serve/tests/test_standalone3.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python/ray/serve/tests/test_standalone3.py b/python/ray/serve/tests/test_standalone3.py index 116ca6236f6b..b55c7d3eba96 100644 --- a/python/ray/serve/tests/test_standalone3.py +++ b/python/ray/serve/tests/test_standalone3.py @@ -20,6 +20,7 @@ from ray.cluster_utils import AutoscalingCluster from ray.exceptions import RayActorError from ray.serve._private.constants import ( + RAY_SERVE_ENABLE_EXPERIMENTAL_STREAMING, SYNC_HANDLE_IN_DAG_FEATURE_FLAG_ENV_KEY, SERVE_DEFAULT_APP_NAME, ) @@ -161,6 +162,10 @@ async def f(): indirect=True, ) @pytest.mark.parametrize("crash", [True, False]) +@pytest.mark.skipif( + RAY_SERVE_ENABLE_EXPERIMENTAL_STREAMING, + reason="No retries w/ new behavior.", +) def test_http_request_number_of_retries(ray_instance, crash): """Test HTTP proxy retry requests.""" From 750faa11da3509f4343234a87cfc6063d1a050fd Mon Sep 17 00:00:00 2001 From: Edward Oakes Date: Tue, 20 Jun 2023 13:55:15 -0500 Subject: [PATCH 2/2] remove unreachable code Signed-off-by: Edward Oakes --- python/ray/actor.py | 1 - python/ray/serve/tests/test_streaming_response.py | 2 -- 2 files changed, 3 deletions(-) diff --git a/python/ray/actor.py b/python/ray/actor.py index c9a060031512..8bc6570e23a9 100644 --- a/python/ray/actor.py +++ b/python/ray/actor.py @@ -1405,7 +1405,6 @@ def exit_actor(): exit.is_ray_terminate = True exit.ray_terminate_msg = "exit_actor() is called." raise exit - assert False, "This process should have terminated." else: raise TypeError( "exit_actor API is called on a non-actor worker, " diff --git a/python/ray/serve/tests/test_streaming_response.py b/python/ray/serve/tests/test_streaming_response.py index fdc46b779e88..f443c4b40324 100644 --- a/python/ray/serve/tests/test_streaming_response.py +++ b/python/ray/serve/tests/test_streaming_response.py @@ -217,12 +217,10 @@ def test_exception_in_generator(serve_instance, use_async: bool, use_fastapi: bo async def hi_gen_async(): yield "first result" raise Exception("raised in generator") - yield "never reached" def hi_gen_sync(): yield "first result" raise Exception("raised in generator") - yield "never reached" if use_fastapi: app = FastAPI()