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_r344855990
##########
File path: test/integration/smoke/test_host_maintenance.py
##########
@@ -196,28 +245,26 @@ def
test_01_cancel_host_maintenace_with_no_migration_jobs(self):
raise unittest.SkipTest("Cancel host maintenance when VMs are
migrating should be tested for 2 or more hosts");
return
- vm_migrating=False
+ migrations_finished = True
try:
- vm_migrating = self.hostPrepareAndCancelMaintenance(listHost[0].id,
listHost[1].id, self.checkNoVmMigratingOnHost)
-
- vm_migrating = self.hostPrepareAndCancelMaintenance(listHost[1].id,
listHost[0].id, self.checkNoVmMigratingOnHost)
+ 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 == True):
- raise unittest.SkipTest("VMs are migrating and the test will not
be able to check the conditions the test is intended for");
+ if (migrations_finished == False):
Review comment:
same as above. Let me see if I can make the code cleaner though it may be
hard to do as most of it has been written while ago.
----------------------------------------------------------------
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