diff --git a/tests/system_tests_tcp_adaptor.py b/tests/system_tests_tcp_adaptor.py index b36fa791f..63c4eb2cd 100644 --- a/tests/system_tests_tcp_adaptor.py +++ b/tests/system_tests_tcp_adaptor.py @@ -168,17 +168,17 @@ def __init__(self, test_name, client_n, logger, client, server, size, delay_close=delay_close) except Exception as exc: - self.e_client.error = "TCP_TEST TcpAdaptor_runner_%s failed. Exception: %s" % \ - (self.name, traceback.format_exc()) - self.logger.log(self.e_client.error) - raise Exception(self.e_client.error) + error = f"TCP_TEST TcpAdaptor_runner_{self.name} failed. Exception: {exc}" + self.logger.log(error) + raise def wait(self): """ Block until the client completes. An exception is raised if the client failed. """ - self.e_client.wait() + if self.e_client is not None: + self.e_client.wait() class TcpAdaptorBase(TestCase):