Fix plasma bug (#7322)

This commit is contained in:
Stephanie Wang
2020-02-25 18:15:28 -08:00
committed by GitHub
parent 44b4394afa
commit 9964657815
2 changed files with 19 additions and 6 deletions
+9
View File
@@ -916,6 +916,15 @@ def test_parallel_actor_fill_plasma_retry(ray_start_cluster_head, num_actors):
}],
indirect=True)
def test_fill_object_store_exception(ray_start_cluster_head):
@ray.remote
def expensive_task():
return np.zeros((10**8) // 10, dtype=np.uint8)
with pytest.raises(ray.exceptions.RayTaskError) as e:
ray.get([expensive_task.remote() for _ in range(20)])
with pytest.raises(ray.exceptions.ObjectStoreFullError):
raise e.as_instanceof_cause()
@ray.remote
class LargeMemoryActor:
def some_expensive_task(self):