From d499601bd76a2f9520a923146c7901ff8d74f351 Mon Sep 17 00:00:00 2001 From: Edward Oakes Date: Wed, 25 Sep 2019 10:55:17 -0700 Subject: [PATCH] Fix flaky checkpoint tests (#5778) --- python/ray/tests/test_actor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/ray/tests/test_actor.py b/python/ray/tests/test_actor.py index e994210e1..900791219 100644 --- a/python/ray/tests/test_actor.py +++ b/python/ray/tests/test_actor.py @@ -25,6 +25,7 @@ from ray.tests.utils import ( relevant_errors, wait_for_condition, wait_for_errors, + wait_for_pid_to_exit, ) @@ -2387,7 +2388,7 @@ def kill_actor(actor): """A helper function that kills an actor process.""" pid = ray.get(actor.get_pid.remote()) os.kill(pid, signal.SIGKILL) - time.sleep(1) + wait_for_pid_to_exit(pid) def test_checkpointing(ray_start_regular, ray_checkpointable_actor_cls):