From 2b42968a53c70f2fd759a22e8e5aeadc18ae65f6 Mon Sep 17 00:00:00 2001 From: Rick Harris Date: Wed, 7 Dec 2011 07:25:18 +0000 Subject: Refactors periodic tasks to use a decorator. Additional work: 1. Added support for tasks being scheduled at differing rates via the `ticks_between_runs` argument. 2. Fixed `reclaim_queued_deletes` so that it doesn't run if `FLAGS.reclaim_instance_interval` is 0. Change-Id: I18c01baf07bd06301a6fe26a7b29dc2452a4fa96 --- nova/tests/test_compute.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nova/tests') diff --git a/nova/tests/test_compute.py b/nova/tests/test_compute.py index a40a3eee4..d333b08ae 100644 --- a/nova/tests/test_compute.py +++ b/nova/tests/test_compute.py @@ -1054,8 +1054,8 @@ class ComputeTestCase(BaseTestCase): self.compute.driver.test_remove_vm(instance_name) # Force the compute manager to do its periodic poll - error_list = self.compute.periodic_tasks(context.get_admin_context()) - self.assertFalse(error_list) + ctxt = context.get_admin_context() + self.compute.periodic_tasks(ctxt, raise_on_error=True) instances = db.instance_get_all(context.get_admin_context()) LOG.info(_("After force-killing instances: %s"), instances) -- cgit