anuragaw commented on a change in pull request #3425: [WIP DO NOT MERGE] Better 
tracking host maintanence success and failure
URL: https://github.com/apache/cloudstack/pull/3425#discussion_r344855701
 
 

 ##########
 File path: test/integration/smoke/test_host_maintenance.py
 ##########
 @@ -254,25 +301,101 @@ def 
test_02_cancel_host_maintenace_with_migration_jobs(self):
                 self.logger.debug("Creating vms = {}".format(no_vm_req))
                 self.vmlist = self.createVMs(listHost[0].id, no_vm_req)
         
-        vm_migrating=False
+        migrations_finished = True
         
         try:
-           
-           vm_migrating = self.hostPrepareAndCancelMaintenance(listHost[0].id, 
listHost[1].id, self.checkVmMigratingOnHost)
-           
-           vm_migrating = self.hostPrepareAndCancelMaintenance(listHost[1].id, 
listHost[0].id, self.checkVmMigratingOnHost)
+            migrations_finished = 
self.hostPrepareAndCancelMaintenance(listHost[0].id, listHost[1].id)
+
+            if migrations_finished:
+                migrations_finished = 
self.hostPrepareAndCancelMaintenance(listHost[1].id, listHost[0].id)
            
         except Exception as e:
             self.logger.debug("Exception {}".format(e))
             self.fail("Cancel host maintenance failed {}".format(e[0]))
-        
 
-        if (vm_migrating == False):
-            raise unittest.SkipTest("No VM is migrating and the test will not 
be able to check the conditions the test is intended for");
-                
-            
+
+        if (migrations_finished == False):
 
 Review comment:
   self.hostPrepareAndCancelMaintenance internally does the checking for us. 
This structure was already laid down.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to