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
This commit is contained in:
Eric Harney 2022-08-22 10:47:13 -04:00
parent befcca345b
commit e340a8cf83
1 changed files with 1 additions and 0 deletions

View File

@ -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'