Fix slow test_connect_volume_device_not_valid test
This test unnecessarily takes 6 seconds to execute so this patch reduces this time to 0.0000 seconds. We have to mock `eventlet.greenthread.sleep` instead of `time.sleep` because that's what is directly being used in oslo_service's loopingcall. TrivialFix Change-Id: I239cfa5dbaccf5648b732d6c414792b8497acc19
This commit is contained in:
parent
7fc3bf912a
commit
cf9eeb1a4e
|
@ -417,6 +417,7 @@ class FibreChannelConnectorTestCase(test_connector.ConnectorTestCase):
|
|||
actual = self.connector.get_all_available_volumes()
|
||||
self.assertItemsEqual(expected, actual)
|
||||
|
||||
@mock.patch('eventlet.greenthread.sleep', mock.Mock())
|
||||
@mock.patch.object(linuxscsi.LinuxSCSI, 'find_multipath_device')
|
||||
@mock.patch.object(linuxscsi.LinuxSCSI, 'wait_for_rw')
|
||||
@mock.patch.object(os.path, 'exists', return_value=True)
|
||||
|
|
Loading…
Reference in New Issue