aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/network_services/traffic_profile
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-09-19 01:07:15 -0700
committerEdward MacGillivray <edward.s.macgillivray@intel.com>2017-09-19 14:36:12 -0700
commit94612c27db940251eb40018a48be73fc7507d1c4 (patch)
tree4072c07ffd725421b9857f6b8b64f963bc7558df /tests/unit/network_services/traffic_profile
parent661d78e5ad9a831a4e6c36287d17ff6829b062d0 (diff)
prox: pass prox_config_dict between Processes using queue
we generate the prox_config_dict in the _run Process, but we also need it in the _traffic_runner Process to get core info. use a queue to pass the config list between the processes enable collect_kpi Change-Id: Ibaf41d606e559a87addf43d6ddaed206dbd2d20c Signed-off-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Edward MacGillivray <edward.s.macgillivray@intel.com>
Diffstat (limited to 'tests/unit/network_services/traffic_profile')
-rw-r--r--tests/unit/network_services/traffic_profile/test_prox_binsearch.py4
-rw-r--r--tests/unit/network_services/traffic_profile/test_prox_mpls.py4
-rw-r--r--tests/unit/network_services/traffic_profile/test_prox_profile.py6
3 files changed, 7 insertions, 7 deletions
diff --git a/tests/unit/network_services/traffic_profile/test_prox_binsearch.py b/tests/unit/network_services/traffic_profile/test_prox_binsearch.py
index 0edce7a14..f56a7fba9 100644
--- a/tests/unit/network_services/traffic_profile/test_prox_binsearch.py
+++ b/tests/unit/network_services/traffic_profile/test_prox_binsearch.py
@@ -56,7 +56,7 @@ class TestProxBinSearchProfile(unittest.TestCase):
profile = ProxBinSearchProfile(tp_config)
profile.init(mock.MagicMock())
- profile.execute(traffic_generator)
+ profile.execute_traffic(traffic_generator)
self.assertEqual(round(profile.current_lower, 2), 74.69)
self.assertEqual(round(profile.current_upper, 2), 75.39)
self.assertEqual(len(runs), 8)
@@ -87,7 +87,7 @@ class TestProxBinSearchProfile(unittest.TestCase):
profile = ProxBinSearchProfile(tp_config)
profile.init(mock.MagicMock())
- profile.execute(traffic_generator)
+ profile.execute_traffic(traffic_generator)
self.assertEqual(round(profile.current_lower, 2), 24.06)
self.assertEqual(round(profile.current_upper, 2), 25.47)
self.assertEqual(len(runs), 7)
diff --git a/tests/unit/network_services/traffic_profile/test_prox_mpls.py b/tests/unit/network_services/traffic_profile/test_prox_mpls.py
index 77bca9cc0..642fecc35 100644
--- a/tests/unit/network_services/traffic_profile/test_prox_mpls.py
+++ b/tests/unit/network_services/traffic_profile/test_prox_mpls.py
@@ -56,7 +56,7 @@ class TestProxMplsTagUntagProfile(unittest.TestCase):
profile = ProxMplsTagUntagProfile(tp_config)
profile.init(mock.MagicMock())
- profile.execute(traffic_generator)
+ profile.execute_traffic(traffic_generator)
self.assertEqual(round(profile.current_lower, 2), 74.69)
self.assertEqual(round(profile.current_upper, 2), 75.39)
self.assertEqual(len(runs), 8)
@@ -87,7 +87,7 @@ class TestProxMplsTagUntagProfile(unittest.TestCase):
profile = ProxMplsTagUntagProfile(tp_config)
profile.init(mock.MagicMock())
- profile.execute(traffic_generator)
+ profile.execute_traffic(traffic_generator)
self.assertEqual(round(profile.current_lower, 2), 24.06)
self.assertEqual(round(profile.current_upper, 2), 25.47)
self.assertEqual(len(runs), 7)
diff --git a/tests/unit/network_services/traffic_profile/test_prox_profile.py b/tests/unit/network_services/traffic_profile/test_prox_profile.py
index 14223da0f..9899d9909 100644
--- a/tests/unit/network_services/traffic_profile/test_prox_profile.py
+++ b/tests/unit/network_services/traffic_profile/test_prox_profile.py
@@ -65,7 +65,7 @@ class TestProxProfile(unittest.TestCase):
profile.init(234)
self.assertEqual(profile.queue, 234)
- def test_execute(self):
+ def test_execute_traffic(self):
packet_sizes = [
10,
100,
@@ -83,9 +83,9 @@ class TestProxProfile(unittest.TestCase):
self.assertFalse(profile.done)
for _ in packet_sizes:
with self.assertRaises(NotImplementedError):
- profile.execute(traffic_generator)
+ profile.execute_traffic(traffic_generator)
- self.assertIsNone(profile.execute(traffic_generator))
+ self.assertIsNone(profile.execute_traffic(traffic_generator))
def test_bounds_iterator(self):
tp_config = {