BAEL-3298 Some more refactoring

This commit is contained in:
Shubhra
2020-02-09 19:13:33 +05:30
parent ef9cf05bc9
commit 0cb246b0be
5 changed files with 10 additions and 4 deletions

View File

@@ -92,7 +92,10 @@ public class SpringBatchRetryIntegrationTest {
//fails for first two calls and passes third time onwards
when(httpResponse.getEntity()).thenReturn(new StringEntity("{ \"age\":10, \"postCode\":\"430222\" }"));
when(httpClient.execute(any())).thenThrow(new ConnectTimeoutException("Timeout count 1")).thenThrow(new ConnectTimeoutException("Timeout count 2")).thenReturn(httpResponse);
when(httpClient.execute(any()))
.thenThrow(new ConnectTimeoutException("Timeout count 1"))
.thenThrow(new ConnectTimeoutException("Timeout count 2"))
.thenReturn(httpResponse);
JobExecution jobExecution = jobLauncherTestUtils.launchJob(defaultJobParameters());
JobInstance actualJobInstance = jobExecution.getJobInstance();