From: Xi Yang Date: Tue, 23 Jun 2015 09:42:18 +0000 (-0400) Subject: Fix timeout issue in EMC VNX driver unit test X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=49c99d1aeebbd63a3d1fe7f270c6cb5467357b00;p=openstack-build%2Fcinder-build.git Fix timeout issue in EMC VNX driver unit test 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 --- diff --git a/cinder/tests/unit/test_emc_vnxdirect.py b/cinder/tests/unit/test_emc_vnxdirect.py index 9d1eb7c3e..df1efbcdb 100644 --- a/cinder/tests/unit/test_emc_vnxdirect.py +++ b/cinder/tests/unit/test_emc_vnxdirect.py @@ -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,