summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Harney <eharney@redhat.com>2022-08-22 10:47:13 -0400
committerEric Harney <eharney@redhat.com>2022-08-22 10:48:43 -0400
commite340a8cf838e890191700972d7b79117689816d9 (patch)
tree41ffb751bb2c5a44fc555acecaa60cb3f44fe928
parentbefcca345b233cae28cd320f20592aaab3fa289a (diff)
downloadglance_store-e340a8cf838e890191700972d7b79117689816d9.tar.gz
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
-rw-r--r--glance_store/tests/unit/common/test_cinder_utils.py1
1 files changed, 1 insertions, 0 deletions
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'