From 3d007c44fe6da93f9c277f114cf244e3d8ebe920 Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Fri, 11 Feb 2022 20:09:39 +0800 Subject: [PATCH] fix: httpPing request in test function --- test.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test.py b/test.py index 88520af..bcbc9ff 100644 --- a/test.py +++ b/test.py @@ -28,7 +28,11 @@ def startTest(testList): if Builder.check(client) != True: print("client unexpected exit") # 客户端启动失败 else: - print(format(Checker.httpPing(client['port']), '.2f') + 'ms') + status, delay = Checker.httpPing(client['port']) + if status == True: + print(format(delay, '.2f') + 'ms') + else: + print(delay) Builder.destroy(client) # 关闭客户端 time.sleep(0.1) serverProcess.terminate() # 关闭服务端