From 8c53d87ad98f9b7a3ed6d4c83a6f0f62969fa64c Mon Sep 17 00:00:00 2001 From: Michael Still Date: Tue, 9 Apr 2013 13:25:38 +1000 Subject: Import and convert to oslo loopingcall. Import the oslo looping call implementation (which is a copy of nova's), delete nova's local copy, convert all users to the new location. It should be noted that the oslo implementation of FixedIntervalLoopingCall measures time from the start of the periodic task, not the end, so periodic tasks will run with a constant frequency instead of the frequency changing depending on how long the periodic task takes to run. Change-Id: Ia62ce1988f5373c09146efa6b3b1d1dc094d50c4 --- nova/tests/test_libvirt.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'nova/tests') diff --git a/nova/tests/test_libvirt.py b/nova/tests/test_libvirt.py index e26c25ff1..748aec95e 100644 --- a/nova/tests/test_libvirt.py +++ b/nova/tests/test_libvirt.py @@ -42,6 +42,7 @@ from nova import exception from nova.openstack.common import fileutils from nova.openstack.common import importutils from nova.openstack.common import jsonutils +from nova.openstack.common import loopingcall from nova.openstack.common import uuidutils from nova import test from nova.tests import fake_libvirt_utils @@ -4844,7 +4845,7 @@ class LibvirtDriverTestCase(test.TestCase): 'uuid': 'not_found_uuid'}) # instance is running case - self.assertRaises(utils.LoopingCallDone, + self.assertRaises(loopingcall.LoopingCallDone, self.libvirtconnection._wait_for_running, {'name': 'running', 'uuid': 'running_uuid'}) @@ -4984,7 +4985,7 @@ class LibvirtDriverTestCase(test.TestCase): self.stubs.Set(self.libvirtconnection, 'to_xml', lambda *a, **k: None) self.stubs.Set(self.libvirtconnection, '_create_domain_and_network', lambda *a: None) - self.stubs.Set(utils, 'FixedIntervalLoopingCall', + self.stubs.Set(loopingcall, 'FixedIntervalLoopingCall', lambda *a, **k: FakeLoopingCall()) libvirt_utils.get_instance_path({}).AndReturn('/fake/foo') -- cgit