erickalendra commented on code in PR #10686:
URL: https://github.com/apache/cloudstack/pull/10686#discussion_r2037780846


##########
plugins/maintenance/src/test/java/org/apache/cloudstack/maintenance/ManagementServerMaintenanceManagerImplTest.java:
##########
@@ -154,7 +154,7 @@ public void 
prepareForShutdownCmdOtherMsHostsInPreparingState() {
         ManagementServerHostVO msHost2 = mock(ManagementServerHostVO.class);
         List<ManagementServerHostVO> msHostList = new ArrayList<>();
         msHostList.add(msHost2);
-        Mockito.when(msHostDao.listBy(any())).thenReturn(msHostList);
+        Mockito.lenient().when(msHostDao.listBy(any())).thenReturn(msHostList);

Review Comment:
   It can be removed. I choose not to remove it because I did not want to 
significantly alter any logic of the tests as part of the Mockito version 
upgrade.
   
   It is unclear to me if the mock is not being used by accident and it should 
be used. I feel the discussion about the test intention should happen 
independently of the Mockito upgrade.



-- 
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: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to