]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix timeout issue in EMC VNX driver unit test
authorXi Yang <xi.yang@emc.com>
Tue, 23 Jun 2015 09:42:18 +0000 (05:42 -0400)
committerXi Yang <xi.yang@emc.com>
Mon, 29 Jun 2015 03:05:15 +0000 (23:05 -0400)
This patch is going to fix the timeout issue in EMC VNX
driver unit test.

Currently, the timeout value of a looping call in EMC unit test
is set to 0.000002s which is too small. The execution time of
a looping call may exceed this timeout value and cause the test
case failure. This fix is changing the timeout to the default
value of VNX driver.

Change-Id: I4aea02403ada8892e45b974be70fb5753721ed39
Closes-Bug: #1467763

cinder/tests/unit/test_emc_vnxdirect.py

index 9d1eb7c3ec41e8345cb6cd742d1da4427cd32528..df1efbcdba966aa7fe72a93d538dfdd600835553 100644 (file)
@@ -1026,7 +1026,6 @@ class DriverTestCaseBase(test.TestCase):
 
         self.stubs.Set(emc_vnx_cli, 'INTERVAL_5_SEC', 0.01)
         self.stubs.Set(emc_vnx_cli, 'INTERVAL_30_SEC', 0.01)
-        self.stubs.Set(emc_vnx_cli, 'INTERVAL_60_SEC', 0.01)
 
         self.configuration = conf.Configuration(None)
         self.configuration.append_config_values = mock.Mock(return_value=0)
@@ -1035,7 +1034,6 @@ class DriverTestCaseBase(test.TestCase):
         self.configuration.storage_vnx_pool_name = 'unit_test_pool'
         self.configuration.san_login = 'sysadmin'
         self.configuration.san_password = 'sysadmin'
-        self.configuration.default_timeout = 1
         self.configuration.initiator_auto_registration = True
         self.configuration.check_max_pool_luns_threshold = False
         self.stubs.Set(self.configuration, 'safe_get',
@@ -2407,6 +2405,7 @@ Time Remaining:  0 second(s)
         commands = [self.testData.LUN_PROPERTY_ALL_CMD('failed_vol1')]
         results = [self.testData.LUN_PROPERTY('failed_vol1', size=2)]
         fake_cli = self.driverSetup(commands, results)
+        self.driver.cli._client.timeout = 0
 
         self.assertRaises(exception.VolumeBackendAPIException,
                           self.driver.extend_volume,