You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/06/23 15:10:42 UTC

[GitHub] [cloudstack] slavkap commented on a change in pull request #5146: (auto) formatting and cleanup fixes

slavkap commented on a change in pull request #5146:
URL: https://github.com/apache/cloudstack/pull/5146#discussion_r657201861



##########
File path: test/integration/smoke/test_volumes.py
##########
@@ -383,29 +367,22 @@ def setUp(self):
                     available")
 
     def tearDown(self):
-        #Clean up, terminate the created volumes
-        if self.attached:
-            self.virtual_machine.get_ssh_client(reconnect = True)
-
-            self.virtual_machine.detach_volume(self.apiClient, self.volume)
-
         if self.virtual_machine.hypervisor == "KVM":
             self.virtual_machine.stop(self.apiClient)
+            if self.attached:
+                self.virtual_machine.detach_volume(self.apiClient, self.volume)
             self.virtual_machine.start(self.apiClient)
-            self.virtual_machine.get_ssh_client(reconnect = True)
-
+            self.virtual_machine.get_ssh_client(reconnect=True)

Review comment:
       ```suggestion
               try:
                   self.virtual_machine.get_ssh_client(reconnect=True)
               except Exception as err:
                   self.fail("SSH failed for Virtual machine: %s due to %s" %
                         self.virtual_machine.ipaddress, err)
   ```
   To catch it if it fails here




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org