Skip to content

Commit

Permalink
[minor] Remove unreachable lines of code (ray-project#36599)
Browse files Browse the repository at this point in the history
Signed-off-by: e428265 <arvind.chandramouli@lmco.com>
  • Loading branch information
edoakes authored and arvind-chandra committed Aug 31, 2023
1 parent 695f3ee commit e3de8bb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion python/ray/actor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, "
Expand Down
5 changes: 5 additions & 0 deletions python/ray/serve/tests/test_standalone3.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down Expand Up @@ -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."""

Expand Down
2 changes: 0 additions & 2 deletions python/ray/serve/tests/test_streaming_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit e3de8bb

Please sign in to comment.