From f0bf7dfe6c6eac91da27c72e2dc31166269f533b Mon Sep 17 00:00:00 2001 From: Myron Sosyak Date: Tue, 7 Aug 2018 17:31:03 +0100 Subject: Fix duration value for IXIA traffic item Removed code that overrides duration value in the update_frame function JIRA: YARDSTICK-1369 Change-Id: Ice06e4fbba4ec93ae086671a2530d521510f89da Signed-off-by: Myron Sosyak --- yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py | 1 - .../tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py b/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py index 82f406d08..06c6b0bcb 100644 --- a/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py +++ b/yardstick/network_services/libs/ixia_libs/ixnet/ixnet_api.py @@ -359,7 +359,6 @@ class IxNextgen(object): # pragma: no cover raise exceptions.IxNetworkFlowNotPresent(flow_group=fg_id) type = traffic_param.get('traffic_type', 'fixedDuration') - duration = traffic_param.get('duration', 30) rate = traffic_param['rate'] rate_unit = ( 'framesPerSecond' if traffic_param['rate_unit'] == diff --git a/yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py b/yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py index 2416aee61..5970ecae6 100644 --- a/yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py +++ b/yardstick/tests/unit/network_services/libs/ixia_libs/test_ixnet_api.py @@ -339,6 +339,11 @@ class TestIxNextgen(unittest.TestCase): self.assertEqual(6, len(self.ixnet_gen.ixnet.setMultiAttribute.mock_calls)) self.assertEqual(4, len(mock_update_frame.mock_calls)) + self.ixnet_gen.ixnet.setMultiAttribute.assert_has_calls([ + mock.call('cfg_element/transmissionControl', + '-type', 'continuous', '-duration', 50) + ]) + def test_update_frame_flow_not_present(self): with mock.patch.object( self.ixnet_gen, '_get_config_element_by_flow_group_name', -- cgit 1.2.3-korg