Mock time.sleep in ISCSIConnectorTestCase
When '_test_connect_volume' is run, 'wait_for_volume_removal' will be called. Neither this method, nor time.sleep is mocked, for which reason this test will take about 20 seconds to complete. This patch simply mocks time.sleep for this test. Change-Id: Iceb0d30ce9f831f5929387eca6918500bbdab944
This commit is contained in:
parent
8d9e115ffc
commit
bb198194f4
|
@ -434,6 +434,7 @@ class ISCSIConnectorTestCase(ConnectorTestCase):
|
|||
'multipath_id': FAKE_SCSI_WWN}
|
||||
self.assertEqual(expected_result, result)
|
||||
|
||||
@mock.patch('time.sleep', mock.Mock())
|
||||
def _test_connect_volume(self, extra_props, additional_commands,
|
||||
transport=None, disconnect_mock=None):
|
||||
# for making sure the /dev/disk/by-path is gone
|
||||
|
|
Loading…
Reference in New Issue