Fix VMAX unit test timeout issue
The unit test test_delete_volume_fast_success timed out because it is doing 60 retries of 10 sec intervals. This patch set the number of retries and interval to 0 in the test. Before this fix, this unit test hung on my setup. After this fix, this unit test finished in 3 secs and the total of 297 VMAX unit tests finished in 11 secs on my setup. Change-Id: I4edfff4c3127623998f251ff014c6f3c11bce4b2 Closes-Bug: #1651615
This commit is contained in:
parent
014fe0be31
commit
b6b41d449c
@ -44,6 +44,8 @@ from cinder.volume.drivers.emc import emc_vmax_utils
|
||||
from cinder.volume import volume_types
|
||||
|
||||
CINDER_EMC_CONFIG_DIR = '/etc/cinder/'
|
||||
emc_vmax_utils.JOB_RETRIES = 0
|
||||
emc_vmax_utils.INTERVAL_10_SEC = 0
|
||||
|
||||
|
||||
class EMC_StorageVolume(dict):
|
||||
@ -3100,9 +3102,10 @@ class EMCVMAXISCSIDriverNoFastTestCase(test.TestCase):
|
||||
poolRec = self.driver.utils.extract_record(arrayInfo, pool)
|
||||
extraSpecs = self.driver.common._set_v2_extra_specs(extraSpecs,
|
||||
poolRec)
|
||||
self.assertEqual(60,
|
||||
# Set JOB_RETRIES and INTERVAL_10_SEC to 0 to avoid timeout
|
||||
self.assertEqual(0,
|
||||
self.driver.utils._get_max_job_retries(extraSpecs))
|
||||
self.assertEqual(10,
|
||||
self.assertEqual(0,
|
||||
self.driver.utils._get_interval_in_secs(extraSpecs))
|
||||
|
||||
def test_interval_only(self):
|
||||
@ -3114,7 +3117,8 @@ class EMCVMAXISCSIDriverNoFastTestCase(test.TestCase):
|
||||
poolRec = self.driver.utils.extract_record(arrayInfo, pool)
|
||||
extraSpecs = self.driver.common._set_v2_extra_specs(extraSpecs,
|
||||
poolRec)
|
||||
self.assertEqual(60,
|
||||
# Set JOB_RETRIES 0 to avoid timeout
|
||||
self.assertEqual(0,
|
||||
self.driver.utils._get_max_job_retries(extraSpecs))
|
||||
self.assertEqual(20,
|
||||
self.driver.utils._get_interval_in_secs(extraSpecs))
|
||||
@ -3134,7 +3138,8 @@ class EMCVMAXISCSIDriverNoFastTestCase(test.TestCase):
|
||||
poolRec)
|
||||
self.assertEqual(70,
|
||||
self.driver.utils._get_max_job_retries(extraSpecs))
|
||||
self.assertEqual(10,
|
||||
# Set INTERVAL_10_SEC to 0 to avoid timeout
|
||||
self.assertEqual(0,
|
||||
self.driver.utils._get_interval_in_secs(extraSpecs))
|
||||
|
||||
bExists = os.path.exists(file_name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user