summaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/network_services
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/tests/unit/network_services')
-rw-r--r--yardstick/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py11
-rw-r--r--yardstick/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py2
2 files changed, 8 insertions, 5 deletions
diff --git a/yardstick/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py b/yardstick/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py
index 0759ecebd..5b39b6cd1 100644
--- a/yardstick/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py
+++ b/yardstick/tests/unit/network_services/traffic_profile/test_ixia_rfc2544.py
@@ -586,7 +586,8 @@ class TestIXIARFC2544Profile(unittest.TestCase):
'Store-Forward_Max_latency_ns': 28}
}
rfc2544_profile = ixia_rfc2544.IXIARFC2544Profile(self.TRAFFIC_PROFILE)
- completed, samples = rfc2544_profile.get_drop_percentage(samples, 0, 1)
+ completed, samples = rfc2544_profile.get_drop_percentage(
+ samples, 0, 1, 4)
self.assertTrue(completed)
self.assertEqual(66.9, samples['TxThroughput'])
self.assertEqual(66.833, samples['RxThroughput'])
@@ -610,7 +611,7 @@ class TestIXIARFC2544Profile(unittest.TestCase):
rfc2544_profile = ixia_rfc2544.IXIARFC2544Profile(self.TRAFFIC_PROFILE)
rfc2544_profile.rate = 1000
completed, samples = rfc2544_profile.get_drop_percentage(
- samples, 0, 0.05)
+ samples, 0, 0.05, 4)
self.assertFalse(completed)
self.assertEqual(66.9, samples['TxThroughput'])
self.assertEqual(66.833, samples['RxThroughput'])
@@ -632,7 +633,7 @@ class TestIXIARFC2544Profile(unittest.TestCase):
rfc2544_profile = ixia_rfc2544.IXIARFC2544Profile(self.TRAFFIC_PROFILE)
rfc2544_profile.rate = 1000
completed, samples = rfc2544_profile.get_drop_percentage(
- samples, 0.2, 1)
+ samples, 0.2, 1, 4)
self.assertFalse(completed)
self.assertEqual(66.9, samples['TxThroughput'])
self.assertEqual(66.833, samples['RxThroughput'])
@@ -655,7 +656,7 @@ class TestIXIARFC2544Profile(unittest.TestCase):
rfc2544_profile = ixia_rfc2544.IXIARFC2544Profile(self.TRAFFIC_PROFILE)
rfc2544_profile.rate = 1000
completed, samples = rfc2544_profile.get_drop_percentage(
- samples, 0.2, 1)
+ samples, 0.2, 1, 4)
self.assertFalse(completed)
self.assertEqual(0.0, samples['TxThroughput'])
self.assertEqual(66.833, samples['RxThroughput'])
@@ -676,7 +677,7 @@ class TestIXIARFC2544Profile(unittest.TestCase):
}
rfc2544_profile = ixia_rfc2544.IXIARFC2544Profile(self.TRAFFIC_PROFILE)
completed, samples = rfc2544_profile.get_drop_percentage(
- samples, 0, 1, first_run=True)
+ samples, 0, 1, 4, first_run=True)
self.assertTrue(completed)
self.assertEqual(66.9, samples['TxThroughput'])
self.assertEqual(66.833, samples['RxThroughput'])
diff --git a/yardstick/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py b/yardstick/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py
index 4a1d8c30e..c9d42fb3e 100644
--- a/yardstick/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py
+++ b/yardstick/tests/unit/network_services/vnf_generic/vnf/test_sample_vnf.py
@@ -1206,6 +1206,7 @@ class TestRfc2544ResourceHelper(unittest.TestCase):
self.assertIsNone(rfc2544_resource_helper._tolerance_high)
self.assertEqual(rfc2544_resource_helper.tolerance_high, 0.15)
self.assertEqual(rfc2544_resource_helper._tolerance_high, 0.15)
+ self.assertEqual(rfc2544_resource_helper._tolerance_precision, 2)
scenario_helper.scenario_cfg = {} # ensure that resource_helper caches
self.assertEqual(rfc2544_resource_helper.tolerance_high, 0.15)
@@ -1240,6 +1241,7 @@ class TestRfc2544ResourceHelper(unittest.TestCase):
rfc2544_resource_helper = Rfc2544ResourceHelper(scenario_helper)
self.assertEqual(rfc2544_resource_helper.tolerance_high, 0.2)
+ self.assertEqual(rfc2544_resource_helper._tolerance_precision, 1)
def test_property_tolerance_low_not_range(self):
scenario_helper = ScenarioHelper('name1')