This is an automated email from the ASF dual-hosted git repository.

pearl11594 pushed a commit to branch ghi12225-removeNic-cpuCap
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/ghi12225-removeNic-cpuCap by 
this push:
     new 07cf173867e fix test
07cf173867e is described below

commit 07cf173867e57c50467e6e159c28d8fa3156807d
Author: Pearl Dsilva <[email protected]>
AuthorDate: Wed Dec 10 12:51:02 2025 -0500

    fix test
---
 server/src/test/java/com/cloud/hypervisor/KVMGuruTest.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/server/src/test/java/com/cloud/hypervisor/KVMGuruTest.java 
b/server/src/test/java/com/cloud/hypervisor/KVMGuruTest.java
index eea8bb9de68..eb11aca1817 100644
--- a/server/src/test/java/com/cloud/hypervisor/KVMGuruTest.java
+++ b/server/src/test/java/com/cloud/hypervisor/KVMGuruTest.java
@@ -141,10 +141,12 @@ public class KVMGuruTest {
         Mockito.verify(vmTO).setCpuQuotaPercentage(Mockito.anyDouble());
     }
 
-    @Test(expected = CloudRuntimeException.class)
+    @Test
     public void testSetVmQuotaPercentageNullHost() {
         Mockito.when(hostDao.findById(hostId)).thenReturn(null);
+        Mockito.when(vm.getLastHostId()).thenReturn(null);
         guru.setVmQuotaPercentage(vmTO, vmProfile);
+        Mockito.verify(vmTO, 
Mockito.never()).setCpuQuotaPercentage(Mockito.anyDouble());
     }
 
     @Test

Reply via email to