weizhouapache commented on a change in pull request #5105:
URL: https://github.com/apache/cloudstack/pull/5105#discussion_r651692362



##########
File path: server/src/test/java/com/cloud/vm/UserVmManagerTest.java
##########
@@ -630,9 +631,9 @@ public void testUpdateVmNicIpSuccess2() throws Exception {
         when(vlan.getVlanNetmask()).thenReturn("255.255.255.0");
 
         when(_ipAddrMgr.allocatePublicIpForGuestNic(Mockito.eq(_networkMock), 
nullable(Long.class), Mockito.eq(_accountMock), 
anyString())).thenReturn("10.10.10.10");
-        lenient().when(_ipAddressDao.findByIpAndSourceNetworkId(anyLong(), 
anyString())).thenReturn(null);
+        when(_ipAddressDao.findByIpAndSourceNetworkId(anyLong(), 
eq("10.10.10.10"))).thenReturn(newIp);
+        when(_ipAddressDao.findByIpAndSourceNetworkId(anyLong(), 
eq("10.10.10.9"))).thenReturn(null);

Review comment:
       @borisstoyanov yes, it is hardcoded, but it is just an unit test.




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

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


Reply via email to