@@ -145,14 +145,14 @@ public void testReallyRunStopAction() {
145145 List <UserVmJoinVO > expiredVms = Arrays .asList (vm );
146146 when (userVmJoinDao .listEligibleInstancesWithExpiredLease ()).thenReturn (expiredVms );
147147 when (userVmJoinDao .findById (1L )).thenReturn (vm );
148- doReturn (1L ).when (vmLeaseManager ).executeStopInstanceJob (eq (vm ), eq ( true ), anyLong ());
148+ doReturn (1L ).when (vmLeaseManager ).executeStopInstanceJob (eq (vm ), anyLong ());
149149 try (MockedStatic <ActionEventUtils > utilities = Mockito .mockStatic (ActionEventUtils .class )) {
150150 utilities .when (() -> ActionEventUtils .onStartedActionEvent (Mockito .anyLong (), Mockito .anyLong (), Mockito .anyString (),
151151 Mockito .anyString (), Mockito .anyLong (), Mockito .anyString (), Mockito .anyBoolean (), Mockito .anyLong ())).thenReturn (1L );
152152
153153 vmLeaseManager .reallyRun ();
154154 }
155- verify (vmLeaseManager ).executeStopInstanceJob (eq (vm ), eq ( true ), anyLong ());
155+ verify (vmLeaseManager ).executeStopInstanceJob (eq (vm ), anyLong ());
156156 }
157157
158158 @ Test
@@ -161,33 +161,33 @@ public void testReallyRunDestroyAction() {
161161 List <UserVmJoinVO > expiredVms = Arrays .asList (vm );
162162 when (userVmJoinDao .listEligibleInstancesWithExpiredLease ()).thenReturn (expiredVms );
163163 when (userVmJoinDao .findById (1L )).thenReturn (vm );
164- doReturn (1L ).when (vmLeaseManager ).executeDestroyInstanceJob (eq (vm ), eq ( true ), anyLong ());
164+ doReturn (1L ).when (vmLeaseManager ).executeDestroyInstanceJob (eq (vm ), anyLong ());
165165 try (MockedStatic <ActionEventUtils > utilities = Mockito .mockStatic (ActionEventUtils .class )) {
166166 utilities .when (() -> ActionEventUtils .onStartedActionEvent (Mockito .anyLong (), Mockito .anyLong (), Mockito .anyString (),
167167 Mockito .anyString (), Mockito .anyLong (), Mockito .anyString (), Mockito .anyBoolean (), Mockito .anyLong ())).thenReturn (1L );
168168 vmLeaseManager .reallyRun ();
169169 }
170- verify (vmLeaseManager ).executeDestroyInstanceJob (eq (vm ), eq ( true ), anyLong ());
170+ verify (vmLeaseManager ).executeDestroyInstanceJob (eq (vm ), anyLong ());
171171 }
172172
173173 @ Test
174174 public void testExecuteExpiryActionStop () {
175175 UserVmJoinVO vm = createMockVm (1L , VM_UUID , VM_NAME , VirtualMachine .State .Running , false );
176- doReturn (1L ).when (vmLeaseManager ).executeStopInstanceJob (eq (vm ), eq (true ), eq ( 123L ));
176+ doReturn (1L ).when (vmLeaseManager ).executeStopInstanceJob (eq (vm ), eq (123L ));
177177 Long jobId = vmLeaseManager .executeExpiryAction (vm , VMLeaseManager .ExpiryAction .STOP , 123L );
178178 assertNotNull (jobId );
179179 assertEquals (1L , jobId .longValue ());
180- verify (vmLeaseManager ).executeStopInstanceJob (eq (vm ), eq (true ), eq ( 123L ));
180+ verify (vmLeaseManager ).executeStopInstanceJob (eq (vm ), eq (123L ));
181181 }
182182
183183 @ Test
184184 public void testExecuteExpiryActionDestroy () {
185185 UserVmJoinVO vm = createMockVm (1L , VM_UUID , VM_NAME , VirtualMachine .State .Running , false , DESTROY );
186- doReturn (1L ).when (vmLeaseManager ).executeDestroyInstanceJob (eq (vm ), eq (true ), eq ( 123L ));
186+ doReturn (1L ).when (vmLeaseManager ).executeDestroyInstanceJob (eq (vm ), eq (123L ));
187187 Long jobId = vmLeaseManager .executeExpiryAction (vm , VMLeaseManager .ExpiryAction .DESTROY , 123L );
188188 assertNotNull (jobId );
189189 assertEquals (1L , jobId .longValue ());
190- verify (vmLeaseManager ).executeDestroyInstanceJob (eq (vm ), eq (true ), eq ( 123L ));
190+ verify (vmLeaseManager ).executeDestroyInstanceJob (eq (vm ), eq (123L ));
191191 }
192192
193193 @ Test
@@ -198,7 +198,7 @@ public void testExecuteStopInstanceJob() {
198198 ApplicationContext mockAppContext = mock (ApplicationContext .class );
199199 mockedComponentContext .when (ComponentContext ::getApplicationContext ).thenReturn (mockAppContext );
200200 mockedComponentContext .when (() -> ComponentContext .inject (any ())).thenReturn (true );
201- long jobId = vmLeaseManager .executeStopInstanceJob (vm , true , 123L );
201+ long jobId = vmLeaseManager .executeStopInstanceJob (vm , 123L );
202202 assertEquals (1L , jobId );
203203 ArgumentCaptor <AsyncJobVO > jobCaptor = ArgumentCaptor .forClass (AsyncJobVO .class );
204204 verify (asyncJobManager ).submitAsyncJob (jobCaptor .capture ());
@@ -218,7 +218,7 @@ public void testExecuteDestroyInstanceJob() {
218218 ApplicationContext mockAppContext = mock (ApplicationContext .class );
219219 mockedComponentContext .when (ComponentContext ::getApplicationContext ).thenReturn (mockAppContext );
220220 mockedComponentContext .when (() -> ComponentContext .inject (any ())).thenReturn (true );
221- long jobId = vmLeaseManager .executeDestroyInstanceJob (vm , true , 123L );
221+ long jobId = vmLeaseManager .executeDestroyInstanceJob (vm , 123L );
222222 assertEquals (1L , jobId );
223223 ArgumentCaptor <AsyncJobVO > jobCaptor = ArgumentCaptor .forClass (AsyncJobVO .class );
224224 verify (asyncJobManager ).submitAsyncJob (jobCaptor .capture ());
0 commit comments