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


##########
test/integration/smoke/test_kms_lifecycle.py:
##########
@@ -424,6 +425,10 @@ def test_12_deploy_vm_with_root_disk_encryption(self):
         Test: deploy a VM with its root disk encrypted using a KMS key.
         Verify that the VM starts and the root volume has the KMS key ID.
         """
+
+        if self.hypervisor.lower() != 'kvm':
+            raise self.skipTest("Skipping test case for non-kvm hypervisor")

Review Comment:
   Same here: `skipTest()` raises internally, so `raise self.skipTest(...)` is 
redundant (and differs from the other skip branches in this test class). Prefer 
calling `self.skipTest(...)` directly.



##########
test/integration/smoke/test_events_resource.py:
##########
@@ -147,6 +147,7 @@ def test_01_events_resource(self):
             diskofferingid=self.disk_offering.id
         )
         self.cleanup.append(volume)
+        time.sleep(10)

Review Comment:
   Hard-coding a fixed 10s sleep before attach makes this test slower and can 
still be flaky if volume allocation takes longer on some backends. Prefer 
polling the volume state until it is Allocated/Ready (or timing out) before 
attaching.



##########
test/integration/smoke/test_network_extension_namespace.py:
##########
@@ -859,6 +859,8 @@ def _check_kvm_host_prerequisites(self, tools=None):
         excluded from the check — the connectivity failure will surface
         naturally when the test later tries to deploy scripts.
         """
+        if self.hv.lower() != 'kvm':
+            raise self.skipTest("Skipping test case for non-kvm hypervisor")

Review Comment:
   `skipTest()` already raises `unittest.SkipTest`; using `raise 
self.skipTest(...)` is redundant and inconsistent with the rest of this file 
(which calls `self.skipTest(...)` directly). Drop the extra `raise` for clarity.



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