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
+5 -5
View File
@@ -1405,7 +1405,7 @@ def test_exception_raised_when_actor_node_dies(head_node_cluster):
# Submit some new actor tasks.
x_ids = [actor.inc.remote() for _ in range(5)]
for x_id in x_ids:
with pytest.raises(ray.worker.RayTaskError):
with pytest.raises(ray.exceptions.RayActorError):
# There is some small chance that ray.get will actually
# succeed (if the object is transferred before the raylet
# dies).
@@ -2128,7 +2128,7 @@ def test_actor_eviction(shutdown_only):
try:
ray.get(obj)
num_success += 1
except ray.worker.RayTaskError:
except ray.exceptions.UnreconstructableError:
num_evicted += 1
# Some objects should have been evicted, and some should still be in the
# object store.
@@ -2173,7 +2173,7 @@ def test_actor_reconstruction(ray_start_regular):
pid = ray.get(actor.get_pid.remote())
os.kill(pid, signal.SIGKILL)
# The actor has exceeded max reconstructions, and this task should fail.
with pytest.raises(ray.worker.RayTaskError):
with pytest.raises(ray.exceptions.RayActorError):
ray.get(actor.increase.remote())
# Create another actor.
@@ -2181,7 +2181,7 @@ def test_actor_reconstruction(ray_start_regular):
# Intentionlly exit the actor
actor.__ray_terminate__.remote()
# Check that the actor won't be reconstructed.
with pytest.raises(ray.worker.RayTaskError):
with pytest.raises(ray.exceptions.RayActorError):
ray.get(actor.increase.remote())
@@ -2241,7 +2241,7 @@ def test_actor_reconstruction_on_node_failure(head_node_cluster):
object_store_socket = ray.get(actor.get_object_store_socket.remote())
kill_node(object_store_socket)
# The actor has exceeded max reconstructions, and this task should fail.
with pytest.raises(ray.worker.RayTaskError):
with pytest.raises(ray.exceptions.RayActorError):
ray.get(actor.increase.remote())