From 121a51911b6c88f97783cf57967506d81de12188 Mon Sep 17 00:00:00 2001 From: Clay Gerrard Date: Wed, 3 Oct 2012 13:00:07 -0500 Subject: [PATCH] Mock out sleep in some retry tests Stub sleep in storwize tests Stub sleep in glance tests Change-Id: Ia935d561d104a4cd6373624208dedf5891b516e3 --- cinder/tests/image/test_glance.py | 1 + cinder/tests/test_storwize_svc.py | 1 + 2 files changed, 2 insertions(+) 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") -- 2.45.2