Handle retries in PowerMax unit tests

Retries internally to PowerMax calls were causing some tests to take
over 13 seconds to run. This is not necessary and wastes time during
execution. This patch mocks the sleep call used internally so the unit
tests do not have unnecessary delays.

Change-Id: Icbe862aab41ac263c29172091f6d77ea418ac949
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2019-11-13 06:52:48 -06:00
parent a4e6da9a93
commit a2d6f88960

View File

@ -15,6 +15,7 @@
import ast
from copy import deepcopy
import time
from unittest import mock
import six
@ -1051,6 +1052,7 @@ class PowerMaxCommonTest(test.TestCase):
mock_del.assert_called_once_with(array, device_id, volume_name)
def test_delete_volume_from_srp_failed(self):
self.mock_object(time, 'sleep')
array = self.data.array
device_id = self.data.failed_resource
volume_name = self.data.test_volume.name