From e340a8cf838e890191700972d7b79117689816d9 Mon Sep 17 00:00:00 2001 From: Eric Harney Date: Mon, 22 Aug 2022 10:47:13 -0400 Subject: Tests: Mock sleep in cinder test_attachment_create_retries This brings the time to run this unit test from 6+ seconds to 0.003s. Change-Id: I0c40e33bb7f35555b50ca04f1b048d9b716b77b5 --- glance_store/tests/unit/common/test_cinder_utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/glance_store/tests/unit/common/test_cinder_utils.py b/glance_store/tests/unit/common/test_cinder_utils.py index 2f68afb..a7d982f 100644 --- a/glance_store/tests/unit/common/test_cinder_utils.py +++ b/glance_store/tests/unit/common/test_cinder_utils.py @@ -74,6 +74,7 @@ class CinderUtilsTestCase(base.BaseTestCase): self.volume_api.attachment_create, self.fake_client, self.fake_vol_id) + @mock.patch('time.sleep', new=mock.Mock()) def test_attachment_create_retries(self): fake_attach_id = 'fake-attach-id' -- cgit v1.2.1