Skip to content

Commit 07cf173

Browse files
committed
fix test
1 parent 864071f commit 07cf173

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/src/test/java/com/cloud/hypervisor/KVMGuruTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,12 @@ public void testSetVmQuotaPercentage() {
141141
Mockito.verify(vmTO).setCpuQuotaPercentage(Mockito.anyDouble());
142142
}
143143

144-
@Test(expected = CloudRuntimeException.class)
144+
@Test
145145
public void testSetVmQuotaPercentageNullHost() {
146146
Mockito.when(hostDao.findById(hostId)).thenReturn(null);
147+
Mockito.when(vm.getLastHostId()).thenReturn(null);
147148
guru.setVmQuotaPercentage(vmTO, vmProfile);
149+
Mockito.verify(vmTO, Mockito.never()).setCpuQuotaPercentage(Mockito.anyDouble());
148150
}
149151

150152
@Test

0 commit comments

Comments
 (0)