aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/benchmark/scenarios/availability/test_basemonitor.py
diff options
context:
space:
mode:
authorJingLu5 <lvjing5@huawei.com>2017-05-25 08:48:15 +0000
committerJing Lu <lvjing5@huawei.com>2017-05-27 07:37:14 +0000
commit37921fcd232cd2fbba9f45ef9fa5d8c912f54af6 (patch)
tree337d1b9576531efd8cdf253db4eaceef057c1ff6 /tests/unit/benchmark/scenarios/availability/test_basemonitor.py
parentb3d7f5e3cbd7e4f4697134eab29993435e57a441 (diff)
Imporve monitor_process pass criteria
JIRA: YARDSTICK-660 The monitor func()'s criteria in the monitor_process.py now is whether at least one process of the specific controller node service is recovered. But in reality is more resonable to use whether processes have been recoverd to it's original amount. This patch is aiming at improving the isssue Change-Id: I950ce2a89555801b96092735b0d670e892049927 Signed-off-by: JingLu5 <lvjing5@huawei.com>
Diffstat (limited to 'tests/unit/benchmark/scenarios/availability/test_basemonitor.py')
-rw-r--r--tests/unit/benchmark/scenarios/availability/test_basemonitor.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/unit/benchmark/scenarios/availability/test_basemonitor.py b/tests/unit/benchmark/scenarios/availability/test_basemonitor.py
index 7030c7849..3b7e07376 100644
--- a/tests/unit/benchmark/scenarios/availability/test_basemonitor.py
+++ b/tests/unit/benchmark/scenarios/availability/test_basemonitor.py
@@ -34,7 +34,7 @@ class MonitorMgrTestCase(unittest.TestCase):
self.monitor_configs.append(config)
def test__MonitorMgr_setup_successful(self, mock_monitor):
- instance = basemonitor.MonitorMgr()
+ instance = basemonitor.MonitorMgr({"nova-api": 10})
instance.init_monitors(self.monitor_configs, None)
instance.start_monitors()
instance.wait_monitors()
@@ -42,7 +42,7 @@ class MonitorMgrTestCase(unittest.TestCase):
ret = instance.verify_SLA()
def test_MonitorMgr_getitem(self, mock_monitor):
- monitorMgr = basemonitor.MonitorMgr()
+ monitorMgr = basemonitor.MonitorMgr({"nova-api": 10})
monitorMgr.init_monitors(self.monitor_configs, None)
monitorIns = monitorMgr['service-status']
@@ -67,12 +67,12 @@ class BaseMonitorTestCase(unittest.TestCase):
}
def test__basemonitor_start_wait_successful(self):
- ins = basemonitor.BaseMonitor(self.monitor_cfg, None)
+ ins = basemonitor.BaseMonitor(self.monitor_cfg, None, {"nova-api": 10})
ins.start_monitor()
ins.wait_monitor()
def test__basemonitor_all_successful(self):
- ins = self.MonitorSimple(self.monitor_cfg, None)
+ ins = self.MonitorSimple(self.monitor_cfg, None, {"nova-api": 10})
ins.setup()
ins.run()
ins.verify_SLA()
@@ -81,7 +81,7 @@ class BaseMonitorTestCase(unittest.TestCase):
'yardstick.benchmark.scenarios.availability.monitor.basemonitor'
'.multiprocessing')
def test__basemonitor_func_false(self, mock_multiprocess):
- ins = self.MonitorSimple(self.monitor_cfg, None)
+ ins = self.MonitorSimple(self.monitor_cfg, None, {"nova-api": 10})
ins.setup()
mock_multiprocess.Event().is_set.return_value = False
ins.run()