Add time.sleep mock for test_lv_deactivate_timeout
We don't need to wait 30 seconds in unit tests for retries. This patch adds mock for time.sleep to make tests faster. Change-Id: Id20f2c26fd352227df11e19b6558beb0f7c2fa8b
This commit is contained in:
parent
03c00d9028
commit
49618ee9be
|
@ -429,7 +429,8 @@ class BrickLvmTestCase(test.TestCase):
|
|||
self.vg.create_volume('test', '1G')
|
||||
self.vg.deactivate_lv('test')
|
||||
|
||||
def test_lv_deactivate_timeout(self):
|
||||
@mock.patch('time.sleep')
|
||||
def test_lv_deactivate_timeout(self, _mock_sleep):
|
||||
with mock.patch.object(self.vg, '_execute'):
|
||||
is_active_mock = mock.Mock()
|
||||
is_active_mock.return_value = True
|
||||
|
|
Loading…
Reference in New Issue