From 62af2f25bed1d5bb9c556c08c2f6e17ce6f461c4 Mon Sep 17 00:00:00 2001 From: Hao Chen Date: Fri, 28 Dec 2018 05:57:52 +0800 Subject: [PATCH] Fix test_multiple_actor_reconstruction failure (#3641) * Fix test_multiple_actor_reconstruction failure * add comment --- test/actor_test.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/test/actor_test.py b/test/actor_test.py index 9a42842d6..9ce1bf8fb 100644 --- a/test/actor_test.py +++ b/test/actor_test.py @@ -40,13 +40,14 @@ def shutdown_only(): @pytest.fixture -def head_node_cluster(): +def head_node_cluster(request): + timeout = getattr(request, 'param', 200) cluster = ray.test.cluster_utils.Cluster( initialize_head=True, connect=True, head_node_args={ "_internal_config": json.dumps({ - "initial_reconstruction_timeout_milliseconds": 200, + "initial_reconstruction_timeout_milliseconds": timeout, "num_heartbeats_timeout": 10, }) }) @@ -2248,6 +2249,11 @@ def test_actor_reconstruction_on_node_failure(head_node_cluster): ray.get(actor.increase.remote()) +# NOTE(hchen): we set initial_reconstruction_timeout_milliseconds to 1s for +# this test. Because if this value is too small, suprious task reconstruction +# may happen and cause the test fauilure. If the value is too large, this test +# could be very slow. We can remove this once we support dynamic timeout. +@pytest.mark.parametrize('head_node_cluster', [1000], indirect=True) def test_multiple_actor_reconstruction(head_node_cluster): # This test can be made more stressful by increasing the numbers below. # The total number of actors created will be