mirror of
https://github.com/wassname/ray.git
synced 2026-06-30 20:18:33 +08:00
[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:
@@ -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__]))
|
||||
|
||||
Reference in New Issue
Block a user