mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 01:00:10 +08:00
Use exit() in __kill_actor__ (#6760)
This commit is contained in:
@@ -1413,12 +1413,12 @@ def test_kill(ray_start_regular):
|
||||
@ray.remote
|
||||
class Actor:
|
||||
def hang(self):
|
||||
# Never returns.
|
||||
ray.get(ray.ObjectID.from_random())
|
||||
while True:
|
||||
time.sleep(1)
|
||||
|
||||
actor = Actor.remote()
|
||||
result = actor.hang.remote()
|
||||
ready, _ = ray.wait([result], timeout=0.1)
|
||||
ready, _ = ray.wait([result], timeout=0.5)
|
||||
assert len(ready) == 0
|
||||
actor.__ray_kill__()
|
||||
with pytest.raises(ray.exceptions.RayActorError):
|
||||
|
||||
Reference in New Issue
Block a user