diff --git a/python/ray/tests/test_client.py b/python/ray/tests/test_client.py index 30d6faccb..73b19a2f2 100644 --- a/python/ray/tests/test_client.py +++ b/python/ray/tests/test_client.py @@ -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):