[ray_client] Fix and extend get_actor test to detached actors (#13016)

This commit is contained in:
Barak Michener
2021-01-26 13:19:51 -08:00
committed by GitHub
parent 6b477dd37a
commit f490e2be43
+14 -1
View File
@@ -322,12 +322,25 @@ def test_basic_named_actor(ray_start_regular_shared):
actor.inc.remote()
actor.inc.remote()
del actor
# Make sure the get_actor call works
new_actor = ray.get_actor("test_acc")
new_actor.inc.remote()
assert ray.get(new_actor.get.remote()) == 3
del actor
actor = Accumulator.options(
name="test_acc2", lifetime="detached").remote()
actor.inc.remote()
del actor
detatched_actor = ray.get_actor("test_acc2")
for i in range(5):
detatched_actor.inc.remote()
assert ray.get(detatched_actor.get.remote()) == 6
@pytest.mark.skipif(sys.platform == "win32", reason="Failing on Windows.")
def test_internal_kv(ray_start_regular_shared):