From 3321555975fe5eba2b706863c845adc869bd34f1 Mon Sep 17 00:00:00 2001 From: Stephanie Wang Date: Thu, 25 Jul 2019 14:23:46 -0700 Subject: [PATCH] Increase timeout for `ray.wait` test (#5273) * Increase test timeout for ray.wait * make sure the actor is scheduled --- python/ray/tests/test_actor.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/python/ray/tests/test_actor.py b/python/ray/tests/test_actor.py index 4f68c2fcf..ba0670999 100644 --- a/python/ray/tests/test_actor.py +++ b/python/ray/tests/test_actor.py @@ -2680,7 +2680,7 @@ def test_decorated_method(ray_start_regular): @pytest.mark.skipif( pytest_timeout is None, reason="Timeout package not installed; skipping test that may hang.") -@pytest.mark.timeout(10) +@pytest.mark.timeout(20) @pytest.mark.parametrize( "ray_start_cluster", [{ "num_cpus": 1, @@ -2744,9 +2744,13 @@ def test_ray_wait_dead_actor(ray_start_cluster): _, self.unready = ray.wait(self.unready, timeout=0) return len(self.unready) == 0 + def ping(self): + return + # Repeatedly call ray.wait through the local actor until the exception for # the dead actor is received. parent_actor = ParentActor.remote(ping_ids) + ray.get(parent_actor.ping.remote()) failure_detected = False while not failure_detected: failure_detected = ray.get(parent_actor.wait.remote())