Fix actor handle id creation when actor handle was pickled (#3074)

This commit is contained in:
Philipp Moritz
2018-10-17 18:00:52 -07:00
committed by Robert Nishihara
parent 3c0803e7e9
commit 2c52d9dfa0
2 changed files with 35 additions and 0 deletions
+22
View File
@@ -1968,6 +1968,28 @@ def test_pickling_actor_handle(ray_start_regular):
ray.get(new_f.method.remote())
def test_pickled_actor_handle_call_in_method_twice(ray_start_regular):
@ray.remote
class Actor1(object):
def f(self):
return 1
@ray.remote
class Actor2(object):
def __init__(self, constructor):
self.actor = constructor()
def step(self):
ray.get(self.actor.f.remote())
a = Actor1.remote()
b = Actor2.remote(lambda: a)
ray.get(b.step.remote())
ray.get(b.step.remote())
def test_register_and_get_named_actors(ray_start_regular):
# TODO(heyucongtom): We should test this from another driver.