The Storwize driver has issues that required them
to add a sleep 1 on init of the driver.
No big deal, but causes unit tests to take a very long
time waiting for the "time.sleep(1)" on every single
unit test that calls init.
This patch just mocks out the time.sleep so we don't have
to do the silly waiting in unit tests.
Change-Id: I10fc3d00252a7e7b90085cb308fb9c6c7e1f5ea7
import mock
import random
import re
+import time
from cinder import context
from cinder import exception
class StorwizeSVCDriverTestCase(test.TestCase):
- def setUp(self):
+ @mock.patch.object(time, 'sleep')
+ def setUp(self, mock_sleep):
super(StorwizeSVCDriverTestCase, self).setUp()
self.USESIM = True
if self.USESIM: