From 7d5ff45a3b793f5e50b4a32b2438ab11fed6c899 Mon Sep 17 00:00:00 2001 From: DanielMartinBuckley Date: Mon, 10 Sep 2018 19:02:10 +0100 Subject: 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 --- yardstick/tests/unit/benchmark/runner/test_duration.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'yardstick/tests/unit/benchmark/runner/test_duration.py') 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(): -- cgit 1.2.3-korg