]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Mock out sleep in some retry tests
authorClay Gerrard <clay.gerrard@gmail.com>
Wed, 3 Oct 2012 18:00:07 +0000 (13:00 -0500)
committerclayg <clay.gerrard@gmail.com>
Thu, 4 Oct 2012 04:13:12 +0000 (23:13 -0500)
Stub sleep in storwize tests
Stub sleep in glance tests

Change-Id: Ia935d561d104a4cd6373624208dedf5891b516e3

cinder/tests/image/test_glance.py
cinder/tests/test_storwize_svc.py

index 4f2d5f15b7bf579b582d1d3138c0bfb2f42aaec7..b61a1a8180ad34cd1f6350ef3031e0cc323e28a5 100644 (file)
@@ -103,6 +103,7 @@ class TestGlanceImageService(test.TestCase):
         client = glance_stubs.StubGlanceClient()
         self.service = self._create_image_service(client)
         self.context = context.RequestContext('fake', 'fake', auth_token=True)
+        self.stubs.Set(glance.time, 'sleep', lambda s: None)
 
     def _create_image_service(self, client):
         def _fake_create_glance_client(context, host, port, version):
index 88b16ec25662b9fd7454d359aae417a87183ebab..c1d308aa85975686edbd0210c0197d00bddb141b 100644 (file)
@@ -937,6 +937,7 @@ class StorwizeSVCDriverTestCase(test.TestCase):
 
         self.driver.do_setup(None)
         self.driver.check_for_setup_error()
+        self.stubs.Set(storwize_svc.time, 'sleep', lambda s: None)
 
     def test_storwize_svc_volume_tests(self):
         self.flags(storwize_svc_vol_rsize="-1")