From 27419ca8e790aa5105dda11b013636c5d1ad8e18 Mon Sep 17 00:00:00 2001 From: "Mytnyk, Volodymyr" Date: Thu, 9 Aug 2018 17:14:39 +0100 Subject: IXIA traffic stops running after first iteration IXIA traffic stops running after first iteration when traffic profile duration is set to 60 sec. JIRA: YARDSTICK-1374 Change-Id: I216b98d43b66aabc72ed88e895b89e28572b264f Signed-off-by: Mytnyk, Volodymyr Signed-off-by: Myron Sosyak --- .../unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'yardstick/tests/unit/network_services/vnf_generic/vnf') diff --git a/yardstick/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py b/yardstick/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py index ddb63242e..ec0e6aa6d 100644 --- a/yardstick/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py +++ b/yardstick/tests/unit/network_services/vnf_generic/vnf/test_tg_rfc2544_ixia.py @@ -18,6 +18,7 @@ import mock import six import unittest +from yardstick.common import utils from yardstick.benchmark import contexts from yardstick.benchmark.contexts import base as ctx_base from yardstick.network_services.libs.ixia_libs.ixnet import ixnet_api @@ -57,6 +58,7 @@ class TestIxiaResourceHelper(unittest.TestCase): def test_run_traffic(self): mock_tprofile = mock.Mock() + mock_tprofile.config.duration = 10 mock_tprofile.get_drop_percentage.return_value = True, 'fake_samples' ixia_rhelper = tg_rfc2544_ixia.IxiaResourceHelper(mock.Mock()) ixia_rhelper.rfc_helper = mock.Mock() @@ -64,7 +66,8 @@ class TestIxiaResourceHelper(unittest.TestCase): ixia_rhelper.vnfd_helper.port_pairs.all_ports = [] with mock.patch.object(ixia_rhelper, 'generate_samples'), \ mock.patch.object(ixia_rhelper, '_build_ports'), \ - mock.patch.object(ixia_rhelper, '_initialize_client'): + mock.patch.object(ixia_rhelper, '_initialize_client'), \ + mock.patch.object(utils, 'wait_until_true'): ixia_rhelper.run_traffic(mock_tprofile) self.assertEqual('fake_samples', ixia_rhelper._queue.get()) -- cgit 1.2.3-korg