[Core] Fix detached actor local mode when gcs actor management is on. (#9839)

* Fix local mode detached actor.

* Revert changes.
This commit is contained in:
SangBin Cho
2020-08-05 09:04:24 -07:00
committed by GitHub
parent ddc1e483fb
commit 685182923c
3 changed files with 70 additions and 0 deletions
+21
View File
@@ -836,5 +836,26 @@ def test_actor_creation_latency(ray_start_regular):
actor_create_time - start, end - start))
@pytest.mark.parametrize(
"ray_start_regular", [{
"local_mode": True
}], indirect=True)
def test_detached_actor_local_mode(ray_start_regular):
RETURN_VALUE = 3
@ray.remote
class Y:
def f(self):
return RETURN_VALUE
Y.options(name="test").remote()
y = ray.get_actor("test")
assert ray.get(y.f.remote()) == RETURN_VALUE
ray.kill(y)
with pytest.raises(ValueError):
ray.get_actor("test")
if __name__ == "__main__":
sys.exit(pytest.main(["-v", __file__]))