diff options
author | Emma Foley <emma.l.foley@intel.com> | 2018-06-29 10:05:50 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-06-29 10:05:50 +0000 |
commit | 6f9c923e7a762338ba2be44964b42b69a77800cc (patch) | |
tree | 5d747ce16adadb1542f5359e56ee833fc6762c40 /yardstick/tests/unit/benchmark/core/test_task.py | |
parent | 1e515b6cc3dd15c399f2663999c9734610494e5c (diff) | |
parent | 96c82664597d128fb10720d4bd104dfb5b2f80f7 (diff) |
Merge changes from topic 'prox-stable/fraser' into stable/fraser
* changes:
NSB NFVi PROX BNG losing many packets
NSB NFVi PROX VPE losing many packets
Decrease Sampling interval
Addition of Configurable Sampling and Configurable Confirmation Retry
Diffstat (limited to 'yardstick/tests/unit/benchmark/core/test_task.py')
-rw-r--r-- | yardstick/tests/unit/benchmark/core/test_task.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/yardstick/tests/unit/benchmark/core/test_task.py b/yardstick/tests/unit/benchmark/core/test_task.py index 7468368df..0424c77a3 100644 --- a/yardstick/tests/unit/benchmark/core/test_task.py +++ b/yardstick/tests/unit/benchmark/core/test_task.py @@ -156,6 +156,31 @@ class TaskTestCase(unittest.TestCase): t._run([scenario], False, "yardstick.out") runner.run.assert_called_once() + @mock.patch.object(task, 'Context') + @mock.patch.object(task, 'base_runner') + def test_run_ProxDuration(self, mock_base_runner, *args): + scenario = { + 'host': 'athena.demo', + 'target': 'ares.demo', + 'runner': { + 'duration': 60, + 'interval': 1, + 'sampled': 'yes', + 'confirmation': 1, + 'type': 'ProxDuration' + }, + 'type': 'Ping' + } + + t = task.Task() + runner = mock.Mock() + runner.join.return_value = 0 + runner.get_output.return_value = {} + runner.get_result.return_value = [] + mock_base_runner.Runner.get.return_value = runner + t._run([scenario], False, "yardstick.out") + runner.run.assert_called_once() + @mock.patch.object(os, 'environ') def test_check_precondition(self, mock_os_environ): cfg = { |