From 31993d50fd449e2d3ba02f3d4d94989130cd2118 Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Fri, 2 Aug 2019 13:42:18 +0000 Subject: [PATCH] Force the kill of the "nc" process only if timeout If the file is received correctly, the "nc" process in the remote machine will end gracefully. Only in case of socket timeout, will force the completion of the process before returning. Change-Id: I6cec868daa0139f6a49807883f901d2eac84fe14 Related-Bug: #1838068 --- neutron_tempest_plugin/scenario/test_qos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/neutron_tempest_plugin/scenario/test_qos.py b/neutron_tempest_plugin/scenario/test_qos.py index 13a06aeb..82a5391c 100644 --- a/neutron_tempest_plugin/scenario/test_qos.py +++ b/neutron_tempest_plugin/scenario/test_qos.py @@ -130,10 +130,10 @@ class QoSTestMixin(object): except socket.timeout: LOG.warning('Socket timeout while reading the remote file, bytes ' 'read: %s', total_bytes_read) + self._kill_nc_process(ssh_client) return False finally: client_socket.close() - self._kill_nc_process(ssh_client) def _create_ssh_client(self): return ssh.Client(self.fip['floating_ip_address'],