aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/tests/unit/benchmark/runner/test_duration.py
diff options
context:
space:
mode:
authorDanielMartinBuckley <daniel.m.buckley@intel.com>2018-09-10 19:02:10 +0100
committerDaniel Martin Buckley <daniel.m.buckley@intel.com>2018-10-02 10:36:39 +0000
commit7d5ff45a3b793f5e50b4a32b2438ab11fed6c899 (patch)
tree8e776a944986c39e89184d01a67335145f833eb5 /yardstick/tests/unit/benchmark/runner/test_duration.py
parentee5d6413dbcbab40234e47ed3e74b85b704d6493 (diff)
NSB PROX NFVi Test does not stop after reaching expected precision
JIRA: YARDSTICK-1419 When using prox_binsearch algorithm, a binary search is performed, increasing lower bound when step was successful and decreasing upper bound when the step was a failure. This runs until the test_precision (as specified in the traffic profile) is reached. When the test precision is reached, the test is not completed until the runner duration is reached. As runner duration is usually high (e.g. 1800sec), the tests take much too long to execute. This makes it difficult to create test suites. Change-Id: I6cc503a09fb534a556c61c805e6df4786bb8cc4b Signed-off-by: Daniel Martin Buckley <daniel.m.buckley@intel.com>
Diffstat (limited to 'yardstick/tests/unit/benchmark/runner/test_duration.py')
-rw-r--r--yardstick/tests/unit/benchmark/runner/test_duration.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/yardstick/tests/unit/benchmark/runner/test_duration.py b/yardstick/tests/unit/benchmark/runner/test_duration.py
index d4801ef2c..fa47e96bf 100644
--- a/yardstick/tests/unit/benchmark/runner/test_duration.py
+++ b/yardstick/tests/unit/benchmark/runner/test_duration.py
@@ -97,9 +97,9 @@ class DurationRunnerTest(unittest.TestCase):
multiprocessing.Event(), mock.Mock())
self._assert_defaults__worker_run_setup_and_teardown()
- self.assertGreater(self.benchmark.pre_run_wait_time.call_count, 2)
- self.assertGreater(self.benchmark.my_method.call_count, 2)
- self.assertGreater(self.benchmark.post_run_wait_time.call_count, 2)
+ self.assertGreater(self.benchmark.pre_run_wait_time.call_count, 0)
+ self.assertGreater(self.benchmark.my_method.call_count, 0)
+ self.assertGreater(self.benchmark.post_run_wait_time.call_count, 0)
def test__worker_process_called_without_cfg(self):
scenario_cfg = {'runner': {}}
@@ -140,9 +140,9 @@ class DurationRunnerTest(unittest.TestCase):
time.sleep(0.1)
self._assert_defaults__worker_run_setup_and_teardown()
- self.assertGreater(self.benchmark.pre_run_wait_time.call_count, 2)
- self.assertGreater(self.benchmark.my_method.count, 103)
- self.assertGreater(self.benchmark.post_run_wait_time.call_count, 2)
+ self.assertGreater(self.benchmark.pre_run_wait_time.call_count, 0)
+ self.assertGreater(self.benchmark.my_method.count, 1)
+ self.assertGreater(self.benchmark.post_run_wait_time.call_count, 0)
count = 101
while not output_queue.empty():
@@ -181,9 +181,9 @@ class DurationRunnerTest(unittest.TestCase):
time.sleep(0.1)
self._assert_defaults__worker_run_setup_and_teardown()
- self.assertGreater(self.benchmark.pre_run_wait_time.call_count, 2)
- self.assertGreater(self.benchmark.my_method.count, 103)
- self.assertGreater(self.benchmark.post_run_wait_time.call_count, 2)
+ self.assertGreater(self.benchmark.pre_run_wait_time.call_count, 0)
+ self.assertGreater(self.benchmark.my_method.count, 1)
+ self.assertGreater(self.benchmark.post_run_wait_time.call_count, 0)
count = 0
while not queue.empty():