From a8dce08618cd8732108326cb5b6b99e8a2213c18 Mon Sep 17 00:00:00 2001 From: "Roger A. Light" Date: Tue, 2 Apr 2019 13:58:44 +0100 Subject: [PATCH] Always kill broker on failure. --- test/broker/08-ssl-connect-cert-auth-without.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/test/broker/08-ssl-connect-cert-auth-without.py b/test/broker/08-ssl-connect-cert-auth-without.py index 2a0405c9..f5fc57b3 100755 --- a/test/broker/08-ssl-connect-cert-auth-without.py +++ b/test/broker/08-ssl-connect-cert-auth-without.py @@ -39,14 +39,13 @@ except ssl.SSLError as err: except socket.error as err: if err.errno == errno.ECONNRESET: rc = 0 - -os.remove(conf_file) -time.sleep(0.5) -broker.terminate() -broker.wait() -(stdo, stde) = broker.communicate() -if rc: - print(stde) +finally: + os.remove(conf_file) + broker.terminate() + broker.wait() + (stdo, stde) = broker.communicate() + if rc: + print(stde) exit(rc)