From 6e26bfe8efe471e68805c21d9c060f203da28a9c Mon Sep 17 00:00:00 2001 From: Xin Pan Date: Mon, 30 Jul 2018 16:38:44 +0800 Subject: [PATCH] polish --- python/paddle/fluid/tests/unittests/test_dist_base.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/test_dist_base.py b/python/paddle/fluid/tests/unittests/test_dist_base.py index af6bacdb24..1aaab6f906 100644 --- a/python/paddle/fluid/tests/unittests/test_dist_base.py +++ b/python/paddle/fluid/tests/unittests/test_dist_base.py @@ -43,7 +43,7 @@ class TestDistBase(unittest.TestCase): return ps0_proc, ps1_proc def _wait_ps_ready(self, pid): - retry_times = 20 + retry_times = 50 while True: assert retry_times >= 0, "wait ps ready failed" time.sleep(3) @@ -52,7 +52,9 @@ class TestDistBase(unittest.TestCase): # on the /tmp directory until it was ready to process all the RPC call. os.stat("/tmp/paddle.%d.port" % pid) return - except os.error: + except os.error as e: + sys.stderr.write('waiting for pserver: %s, left retry %d\n' % + (e, retry_times)) retry_times -= 1 def check_with_place(self, model_file, delta=1e-3): -- GitLab