@@ -207,26 +207,4 @@ public void retryHttpRequestNoException() throws IOException {
207207 Mockito .verify (newRedfishClientspy , Mockito .times (1 )).retryHttpRequest (Mockito .anyString (), Mockito .any (), Mockito .any ());
208208 Mockito .verify (client , Mockito .times (3 )).execute (Mockito .any ());
209209 }
210-
211- @ Test (expected = RedfishException .class )
212- public void retryHttpRequestExceptionAfterTwoRetries () throws IOException {
213- Mockito .when (client .execute (httpReq )).thenThrow (IOException .class ).thenThrow (IOException .class );
214-
215- RedfishClient newRedfishClientspy = Mockito .spy (new RedfishClient (USERNAME , PASSWORD , true , true , REDFISHT_REQUEST_RETRIES ));
216- newRedfishClientspy .retryHttpRequest (url , httpReq , client );
217-
218- Mockito .verify (newRedfishClientspy , Mockito .never ()).retryHttpRequest (Mockito .anyString (), Mockito .any (), Mockito .any ());
219- Mockito .verify (client , Mockito .never ()).execute (Mockito .any ());
220- }
221-
222- @ Test
223- public void retryHttpRequestSuccessAtTheSecondRetry () throws IOException {
224- Mockito .when (client .execute (httpReq )).thenThrow (IOException .class ).thenReturn (httpResponse );
225-
226- RedfishClient newRedfishClientspy = Mockito .spy (new RedfishClient (USERNAME , PASSWORD , true , true , REDFISHT_REQUEST_RETRIES ));
227- newRedfishClientspy .retryHttpRequest (url , httpReq , client );
228-
229- Mockito .verify (newRedfishClientspy , Mockito .times (1 )).retryHttpRequest (Mockito .anyString (), Mockito .any (), Mockito .any ());
230- Mockito .verify (client , Mockito .times (REDFISHT_REQUEST_RETRIES )).execute (Mockito .any ());
231- }
232210}
0 commit comments