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:
parent
befcca345b
commit
e340a8cf83
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue