You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by we...@apache.org on 2026/10/02 12:49:18 UTC
(cloudstack) 18/22: test: add more time.sleep(10) in test_vm_strict_host_tags.py
This is an automated email from the ASF dual-hosted git repository.
weizhouapache pushed a commit to branch 4.23.0-ceph
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit 167b9c78e2a285a7aa293b19a54f00607d41c30f
Author: Wei Zhou <we...@apache.org>
AuthorDate: Tue Jul 28 14:50:48 2026 +0200
test: add more time.sleep(10) in test_vm_strict_host_tags.py
---
test/integration/smoke/test_vm_strict_host_tags.py | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/test/integration/smoke/test_vm_strict_host_tags.py b/test/integration/smoke/test_vm_strict_host_tags.py
index aac3e1ea65f..26d36d7b5c3 100644
--- a/test/integration/smoke/test_vm_strict_host_tags.py
+++ b/test/integration/smoke/test_vm_strict_host_tags.py
@@ -22,6 +22,7 @@ from marvin.lib.base import (Account, ServiceOffering, Template, Host, VirtualMa
from marvin.lib.common import (get_domain, get_zone)
from nose.plugins.attrib import attr
+import time
class TestVMDeploymentPlannerStrictTags(cloudstackTestCase):
@@ -529,6 +530,8 @@ class TestMigrateVMStrictTags(cloudstackTestCase):
self.cleanup.append(vm)
self.assertEqual(self.host_h1.id, vm.hostid, "VM instance was not deployed on target host ID")
Host.update(self.apiclient, id=self.host_h2.id, hosttags="h1,t1,v1")
+
+ time.sleep(10) # Wait for VM to boot into OS before migrating the VM
vm.migrate(self.apiclient, self.host_h2.id)
migrated_vm = VirtualMachine.list(self.apiclient, id=vm.id, listall=True)[0]
self.assertEqual(migrated_vm.hostid, self.host_h2.id, "VM was not migratd")
@@ -545,6 +548,7 @@ class TestMigrateVMStrictTags(cloudstackTestCase):
self.assertEqual(self.host_h1.id, vm.hostid, "VM instance was not deployed on target host ID")
Host.update(self.apiclient, id=self.host_h2.id, hosttags="h2,t2,v2")
try:
+ time.sleep(10) # Wait for VM to boot into OS before migrating the VM
vm.migrate(self.apiclient, self.host_h2.id)
VirtualMachine.list(self.apiclient, id=vm.id, listall=True)[0]
self.fail("VM should not be migrated")