diff options
Diffstat (limited to 'yardstick/tests/unit/benchmark')
-rw-r--r-- | yardstick/tests/unit/benchmark/runner/test_duration.py | 18 | ||||
-rw-r--r-- | yardstick/tests/unit/benchmark/runner/test_proxduration.py | 2 |
2 files changed, 10 insertions, 10 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(): diff --git a/yardstick/tests/unit/benchmark/runner/test_proxduration.py b/yardstick/tests/unit/benchmark/runner/test_proxduration.py index 3299c5b05..056195fd3 100644 --- a/yardstick/tests/unit/benchmark/runner/test_proxduration.py +++ b/yardstick/tests/unit/benchmark/runner/test_proxduration.py @@ -97,7 +97,7 @@ class ProxDurationRunnerTest(unittest.TestCase): {}, multiprocessing.Event(), mock.Mock()) self._assert_defaults__worker_run_setup_and_teardown() - self.assertGreater(self.benchmark.my_method.call_count, 2) + self.assertGreater(self.benchmark.my_method.call_count, 0) def test__worker_process_called_without_cfg(self): scenario_cfg = {'runner': {}} |