From 70407df2df9e60c5591904eb6dd524d850fc7d69 Mon Sep 17 00:00:00 2001 From: dnomd343 Date: Mon, 1 Aug 2022 01:17:00 +0800 Subject: [PATCH] fix: nothing output in test capture --- Tester/__init__.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Tester/__init__.py b/Tester/__init__.py index 23c3738..cb00395 100644 --- a/Tester/__init__.py +++ b/Tester/__init__.py @@ -67,8 +67,11 @@ def runTest(testInfo: dict, testUrl: str, testFilter: set or None, delay: int = logging.debug('start test process') time.sleep(delay) httpCheck(testInfo['socks'], testUrl) + testInfo['client'].quit() + testInfo['server'].quit() except: # client debug info + testInfo['client'].quit() logging.warning('client info') logging.error('command -> %s' % testInfo['client'].cmd) logging.error('envVar -> %s' % testInfo['client'].env) @@ -76,15 +79,13 @@ def runTest(testInfo: dict, testUrl: str, testFilter: set or None, delay: int = logging.warning('client capture output') logging.error('\n%s' % testInfo['client'].output) # server debug info + testInfo['server'].quit() logging.warning('server info') logging.error('command -> %s' % testInfo['server'].cmd) logging.error('envVar -> %s' % testInfo['server'].env) logging.error('file -> %s' % testInfo['server'].file) logging.warning('server capture output') logging.error('\n%s' % testInfo['server'].output) - finally: - testInfo['client'].quit() - testInfo['server'].quit() def test(testIter: iter, threadNum: int, testUrl: str, testFilter: set or None = None):