Skip to content

Commit 7218f4f

Browse files
committed
update by comment
1 parent 8939f17 commit 7218f4f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python/paddle/fluid/tests/unittests/test_listen_and_serv_op.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ def _start_pserver(self, use_cuda, sync_mode):
7272
def _wait_ps_ready(self, pid):
7373
retry_times = self.ps_timeout
7474
while True:
75-
time.sleep(1)
7675
assert retry_times >= 0, "wait ps ready failed"
76+
time.sleep(0.5)
7777
try:
7878
# the listen_and_serv_op would touch a file which contains the listen port
7979
# on the /tmp directory until it was ready to process all the RPC call.
@@ -87,15 +87,15 @@ def test_handle_signal_in_serv_op(self):
8787
pid = self._start_pserver(False, True)
8888
self._wait_ps_ready(pid)
8989

90-
# raise SIGINT to pserver
91-
os.kill(pid, signal.SIGINT)
90+
# raise SIGTERM to pserver
91+
os.kill(pid, signal.SIGTERM)
9292

9393
# run pserver on CPU in async mode
9494
pid = self._start_pserver(False, False)
9595
self._wait_ps_ready(pid)
9696

9797
# raise SIGTERM to pserver
98-
os.kill(pid, signal.SIGINT)
98+
os.kill(pid, signal.SIGTERM)
9999

100100

101101
if __name__ == '__main__':

0 commit comments

Comments
 (0)