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 758bfd5f4b5148650b3d33fa67a87c9553259e93
Author: Wei Zhou <[email protected]>
AuthorDate: Fri Jul 17 11:41:28 2026 +0200

    test: sleep 10 seconds before attaching volume in test_events_resource.py
---
 test/integration/smoke/test_events_resource.py | 20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)

diff --git a/test/integration/smoke/test_events_resource.py 
b/test/integration/smoke/test_events_resource.py
index 1f5fd3a60c1..fce0e6d7370 100644
--- a/test/integration/smoke/test_events_resource.py
+++ b/test/integration/smoke/test_events_resource.py
@@ -147,25 +147,17 @@ class TestEventsResource(cloudstackTestCase):
             diskofferingid=self.disk_offering.id
         )
         self.cleanup.append(volume)
-        try:
-            virtual_machine.attach_volume(
-                self.apiclient,
-                volume
-            )
-        except Exception as e:
-            print("Failed to attach volume to VM: %s" % e)
-            pass
-
+        time.sleep(10)
+        virtual_machine.attach_volume(
+            self.apiclient,
+            volume
+        )
         virtual_machine.stop(self.apiclient)
         account_network.restart(self.apiclient, cleanup=False)
         time.sleep(self.services["sleep"])
         virtual_machine.restore(self.apiclient)
         time.sleep(self.services["sleep"])
-        try:
-            virtual_machine.detach_volume(self.apiclient, volume)
-        except Exception as e:
-            print("Failed to detach volume from VM: %s" % e)
-            pass
+        virtual_machine.detach_volume(self.apiclient, volume)
         volume.delete(self.apiclient)
         self.cleanup.remove(volume)
         ts = str(time.time())

Reply via email to