]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
EMC SMI-S delete snapshot unit test takes too long
authorXing Yang <xing.yang@emc.com>
Fri, 7 Mar 2014 18:43:22 +0000 (13:43 -0500)
committerXing Yang <xing.yang@emc.com>
Sat, 8 Mar 2014 00:09:51 +0000 (19:09 -0500)
EMC SMI-S unit test for deleting snapshot takes too long.
This patch sets Timout to 0 in cinder_emc_config.xml
so that it will return immediately.  Without this fix,
it will wait for 10 seconds by default.

Change-Id: I223f6741a2ce393e555467350201a695ae210152
Closes-Bug: #1289653

cinder/tests/test_emc_smis.py

index 7e5a7ccc24d3f004520c1cd101bbaeeee7019d46..aa4372b6dd83c48dc232a3ec50a75e32abe06748 100644 (file)
@@ -947,6 +947,11 @@ class EMCSMISISCSIDriverTestCase(test.TestCase):
         emc.appendChild(ecompassword)
         ecompassword.appendChild(ecompasswordtext)
 
+        timeout = doc.createElement("Timeout")
+        timeouttext = doc.createTextNode("0")
+        emc.appendChild(timeout)
+        timeout.appendChild(timeouttext)
+
         self.config_file_path = self.tempdir + '/' + self.data.config_file_name
         f = open(self.config_file_path, 'w')
         doc.writexml(f)
@@ -1149,6 +1154,11 @@ class EMCSMISFCDriverTestCase(test.TestCase):
         emc.appendChild(ecompassword)
         ecompassword.appendChild(ecompasswordtext)
 
+        timeout = doc.createElement("Timeout")
+        timeouttext = doc.createTextNode("0")
+        emc.appendChild(timeout)
+        timeout.appendChild(timeouttext)
+
         self.config_file_path = self.tempdir + '/' + self.data.config_file_name
         f = open(self.config_file_path, 'w')
         doc.writexml(f)