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