Skip to content

Commit

Permalink
removed shutdown testcase (maybe, calling System.exit)
Browse files Browse the repository at this point in the history
  • Loading branch information
sureshanaparti committed Mar 11, 2025
1 parent 515e996 commit e14b071
Showing 1 changed file with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,19 +288,6 @@ public void triggerShutdownCmdMsInUpStateAndOtherMsHostsInPreparingState() {
});
}

@Test
public void triggerShutdownCmd() {
ManagementServerHostVO msHost = mock(ManagementServerHostVO.class);
Mockito.when(msHost.getState()).thenReturn(ManagementServerHost.State.ReadyToShutDown);
Mockito.when(msHostDao.findById(1L)).thenReturn(msHost);
TriggerShutdownCmd cmd = mock(TriggerShutdownCmd.class);
Mockito.when(cmd.getManagementServerId()).thenReturn(1L);
Mockito.when(clusterManagerMock.execute(anyString(), anyLong(), anyString(), anyBoolean())).thenReturn("Success");

spy.triggerShutdown(cmd);
Mockito.verify(clusterManagerMock, Mockito.times(1)).execute(anyString(), anyLong(), anyString(), anyBoolean());
}

@Test
public void prepareForMaintenanceAndCancelFromMaintenanceState() {
Mockito.doNothing().when(jobManagerMock).disableAsyncJobs();
Expand Down

0 comments on commit e14b071

Please sign in to comment.