Copilot commented on code in PR #13628:
URL: https://github.com/apache/cloudstack/pull/13628#discussion_r3658235988


##########
test/integration/smoke/test_vm_life_cycle.py:
##########
@@ -858,6 +858,7 @@ def test_11_destroy_vm_and_volumes(self):
             zoneid=self.zone.id
         )
 
+        time.sleep(10)

Review Comment:
   A fixed sleep makes this test slower and still potentially flaky because 
Volume.create() returns immediately and the volume may not be in state 'Ready' 
after 10s on slower backends/hypervisors. Prefer polling the volume state until 
it becomes Ready (with a timeout) before attaching.



##########
test/integration/smoke/test_usage.py:
##########
@@ -782,6 +783,7 @@ def test_01_volume_usage(self):
         )
         rool_volume_pool = rool_volume_pool_response[0]
         try:
+            time.sleep(10)
             self.virtual_machine.attach_volume(self.apiclient,volume_uploaded)

Review Comment:
   Sleeping a fixed 10s before attach makes the test slower and doesn't 
guarantee the VM/host is ready for a hot-plug attach on slower hypervisors. A 
bounded retry loop around attach_volume() (with short sleeps) is both faster 
when things are ready quickly and more reliable when readiness takes longer.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to