Propagate backend error to worker (#4039)

This commit is contained in:
Hao Chen
2019-02-16 11:39:15 +08:00
committed by GitHub
parent 4be3d0c5d3
commit de17443dc2
21 changed files with 635 additions and 258 deletions
+4 -3
View File
@@ -319,7 +319,8 @@ def test_worker_dying(ray_start_regular):
def f():
eval("exit()")
f.remote()
with pytest.raises(ray.exceptions.RayWorkerError):
ray.get(f.remote())
wait_for_errors(ray_constants.WORKER_DIED_PUSH_ERROR, 1)
@@ -340,9 +341,9 @@ def test_actor_worker_dying(ray_start_regular):
a = Actor.remote()
[obj], _ = ray.wait([a.kill.remote()], timeout=5.0)
with pytest.raises(Exception):
with pytest.raises(ray.exceptions.RayActorError):
ray.get(obj)
with pytest.raises(Exception):
with pytest.raises(ray.exceptions.RayTaskError):
ray.get(consume.remote(obj))
wait_for_errors(ray_constants.WORKER_DIED_PUSH_ERROR, 1)