From 147e7d46ec9bcdd69315468c9161cd784c3038d6 Mon Sep 17 00:00:00 2001 From: Simon Mo Date: Mon, 9 Sep 2019 19:21:20 -0700 Subject: [PATCH] [Flaky tests] FIx test fork (#5671) * Start testing test_fork Maybe queue actor takes too long to initialize, that's why we are seeing "Many python processes started" since most of the python tasks are blocked on ray.get * Add a comment --- python/ray/tests/test_actor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/ray/tests/test_actor.py b/python/ray/tests/test_actor.py index 1213bb4ae..e28ee35cf 100644 --- a/python/ray/tests/test_actor.py +++ b/python/ray/tests/test_actor.py @@ -1787,9 +1787,13 @@ def setup_queue_actor(): def test_fork(setup_queue_actor): queue = setup_queue_actor + # Make sure queue actor is initialized. + ray.get(queue.read.remote()) @ray.remote def fork(queue, key, item): + # ray.get here could be blocked and cause ray to start + # a lot of python workers. return ray.get(queue.enqueue.remote(key, item)) # Fork num_iters times.