bugfix: tc038 ssh default wait 3600s 11/39111/2
authorrexlee8776 <limingjiang@huawei.com>
Fri, 11 Aug 2017 07:04:35 +0000 (07:04 +0000)
committerrexlee8776 <limingjiang@huawei.com>
Fri, 11 Aug 2017 07:20:02 +0000 (07:20 +0000)
JIRA: YARDSTICK-771

Change-Id: Ibcd2228505d341feb09b0d477e5f4ed6062c1e89
Signed-off-by: rexlee8776 <limingjiang@huawei.com>
tests/unit/benchmark/scenarios/networking/test_pktgen.py
yardstick/benchmark/scenarios/networking/pktgen.py

index 2914c8e..32ba255 100644 (file)
@@ -68,7 +68,7 @@ class PktgenTestCase(unittest.TestCase):
         mock_ssh.SSH.from_node().execute.assert_called_with(
             "sudo iptables -F; "
             "sudo iptables -A INPUT -p udp --dport 1000:%s -j DROP"
-            % 1010)
+            % 1010, timeout=60)
 
     def test_pktgen_unsuccessful_iptables_setup(self, mock_ssh):
 
index 8ca1ca6..1e0a5fc 100644 (file)
@@ -20,6 +20,7 @@ from yardstick.benchmark.scenarios import base
 
 LOG = logging.getLogger(__name__)
 
+SSH_TIMEOUT = 60
 VNIC_TYPE_LIST = ["ovs", "sriov"]
 SRIOV_DRIVER_LIST = ["ixgbevf", "i40evf"]
 
@@ -287,7 +288,7 @@ class Pktgen(base.Scenario):
               "sudo iptables -A INPUT -p udp --dport 1000:%s -j DROP" \
               % (1000 + self.number_of_ports)
         LOG.debug("Executing command: %s", cmd)
-        status, _, stderr = self.server.execute(cmd)
+        status, _, stderr = self.server.execute(cmd, timeout=SSH_TIMEOUT)
         if status:
             raise RuntimeError(stderr)
 
@@ -349,7 +350,7 @@ class Pktgen(base.Scenario):
                duration, queue_number, pps)
 
         LOG.debug("Executing command: %s", cmd)
-        status, stdout, stderr = self.client.execute(cmd)
+        status, stdout, stderr = self.client.execute(cmd, timeout=SSH_TIMEOUT)
 
         if status:
             raise RuntimeError(stderr)