Skip to content

Commit

Permalink
Fix wrong check
Browse files Browse the repository at this point in the history
Closes: #49451
Signed-off-by: Chi-Sheng Liu <[email protected]>
  • Loading branch information
MortalHappiness committed Mar 5, 2025
1 parent 8a931f4 commit 7d340e8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions python/ray/tests/test_actor_failures.py
Original file line number Diff line number Diff line change
Expand Up @@ -994,8 +994,14 @@ async def exit(self):

a = AsyncActor.remote()
ray.get(a.__ray_ready__.remote())
with pytest.raises(ray.exceptions.RayActorError):
with pytest.raises(ray.exceptions.RayActorError) as exc_info:
ray.get(a.exit.remote())
assert (
# Exited when task execution returns
"exit_actor()" in str(exc_info.value)
# Exited during periodical check in worker
or "User requested to exit the actor" in str(exc_info.value)
)

def verify():
return temp_file_atexit.exists()
Expand Down Expand Up @@ -1024,14 +1030,8 @@ async def create(self):

a = AsyncActor.remote()
ray.get(a.__ray_ready__.remote())
with pytest.raises(ray.exceptions.RayActorError) as exc_info:
with pytest.raises(ray.exceptions.RayActorError):
ray.get(a.exit.remote())
assert (
# Exited when task execution returns
"exit_actor()" in str(exc_info.value)
# Exited during periodical check in worker
or "User requested to exit the actor" in str(exc_info.value)
)

with pytest.raises(ray.exceptions.RayActorError):
ray.get(a.create.remote())
Expand Down

0 comments on commit 7d340e8

Please sign in to comment.