From 7218f4feb28e295b55e0eedd1d0e437e190c4de8 Mon Sep 17 00:00:00 2001 From: Yancey1989 Date: Mon, 4 Jun 2018 10:42:26 +0800 Subject: [PATCH] update by comment --- .../fluid/tests/unittests/test_listen_and_serv_op.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/paddle/fluid/tests/unittests/test_listen_and_serv_op.py b/python/paddle/fluid/tests/unittests/test_listen_and_serv_op.py index ad479657cc..6be24b0944 100644 --- a/python/paddle/fluid/tests/unittests/test_listen_and_serv_op.py +++ b/python/paddle/fluid/tests/unittests/test_listen_and_serv_op.py @@ -72,8 +72,8 @@ class TestListenAndServOp(OpTest): def _wait_ps_ready(self, pid): retry_times = self.ps_timeout while True: - time.sleep(1) assert retry_times >= 0, "wait ps ready failed" + time.sleep(0.5) try: # the listen_and_serv_op would touch a file which contains the listen port # on the /tmp directory until it was ready to process all the RPC call. @@ -87,15 +87,15 @@ class TestListenAndServOp(OpTest): pid = self._start_pserver(False, True) self._wait_ps_ready(pid) - # raise SIGINT to pserver - os.kill(pid, signal.SIGINT) + # raise SIGTERM to pserver + os.kill(pid, signal.SIGTERM) # run pserver on CPU in async mode pid = self._start_pserver(False, False) self._wait_ps_ready(pid) # raise SIGTERM to pserver - os.kill(pid, signal.SIGINT) + os.kill(pid, signal.SIGTERM) if __name__ == '__main__': -- GitLab