mirror of
https://github.com/wassname/ray.git
synced 2026-06-28 01:16:06 +08:00
[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
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user