mirror of
https://github.com/wassname/ray.git
synced 2026-06-27 20:06:31 +08:00
[ray_client] Fix and extend get_actor test to detached actors (#13016)
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user