From 5881417ec4a993194ba6d64b156ad6b5ffbca97c Mon Sep 17 00:00:00 2001 From: fangfengbin <869218239a@zju.edu.cn> Date: Sat, 18 Jul 2020 02:53:29 +0800 Subject: [PATCH] Fix bug that `test_multi_node.py::test_multi_driver_logging` hangs when GCS actor management is turned on (#9539) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 灵洵 --- python/ray/tests/test_multi_node.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/python/ray/tests/test_multi_node.py b/python/ray/tests/test_multi_node.py index d600d2cf7..f8fa26279 100644 --- a/python/ray/tests/test_multi_node.py +++ b/python/ray/tests/test_multi_node.py @@ -638,6 +638,13 @@ def test_multi_driver_logging(ray_start_regular): driver2_wait = Semaphore.options(name="driver2_wait").remote(value=0) main_wait = Semaphore.options(name="main_wait").remote(value=0) + # The creation of an actor is asynchronous. + # We need to wait for the completion of the actor creation, + # otherwise we can't get the actor by name. + ray.get(driver1_wait.locked.remote()) + ray.get(driver2_wait.locked.remote()) + ray.get(main_wait.locked.remote()) + # Params are address, semaphore name, output1, output2 driver_script_template = """ import ray