From: Clay Gerrard Date: Wed, 3 Oct 2012 18:00:07 +0000 (-0500) Subject: Mock out sleep in some retry tests X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=121a51911b6c88f97783cf57967506d81de12188;p=openstack-build%2Fcinder-build.git Mock out sleep in some retry tests Stub sleep in storwize tests Stub sleep in glance tests Change-Id: Ia935d561d104a4cd6373624208dedf5891b516e3 --- diff --git a/cinder/tests/image/test_glance.py b/cinder/tests/image/test_glance.py index 4f2d5f15b..b61a1a818 100644 --- a/cinder/tests/image/test_glance.py +++ b/cinder/tests/image/test_glance.py @@ -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): diff --git a/cinder/tests/test_storwize_svc.py b/cinder/tests/test_storwize_svc.py index 88b16ec25..c1d308aa8 100644 --- a/cinder/tests/test_storwize_svc.py +++ b/cinder/tests/test_storwize_svc.py @@ -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")