@Test public void shouldNotScheduleTaskRetryOnFailureWhenRetryTaskOnFailureIsFalse() throws Exception { setTriggerEvent(); setActionEvent(); task.setRetryTaskOnFailure(false); actionEvent.setServiceInterface("TestService"); actionEvent.setServiceMethod("abc"); when(taskService.findActiveTasksForTriggerSubject(triggerEvent.getSubject())).thenReturn(tasks); when(taskService.getActionEventFor(task.getActions().get(0))).thenThrow(new RuntimeException()); MotechEvent event = createEvent(); taskRetryHandler.handleTaskRetries(task, event.getParameters()); verify(eventRelay, never()).sendEventMessage(any(MotechEvent.class)); }
public void handleTaskRetries(Task task, Map<String, Object> parameters) { if (task.isRetryTaskOnFailure()) { LOGGER.info("Scheduling task retries, since the execution of a task failed."); scheduleTaskRetry(task, parameters); } }
TaskRetryHandler { public void handleTaskRetries(Task task, Map<String, Object> parameters) { if (task.isRetryTaskOnFailure()) { LOGGER.info("Scheduling task retries, since the execution of a task failed."); scheduleTaskRetry(task, parameters); } } }
TaskRetryHandler { public void handleTaskRetries(Task task, Map<String, Object> parameters) { if (task.isRetryTaskOnFailure()) { LOGGER.info("Scheduling task retries, since the execution of a task failed."); scheduleTaskRetry(task, parameters); } }  }
TaskRetryHandler { public void handleTaskRetries(Task task, Map<String, Object> parameters) { if (task.isRetryTaskOnFailure()) { LOGGER.info("Scheduling task retries, since the execution of a task failed."); scheduleTaskRetry(task, parameters); } }  void handleTaskRetries(Task task, Map<String, Object> parameters); }
TaskRetryHandler { public void handleTaskRetries(Task task, Map<String, Object> parameters) { if (task.isRetryTaskOnFailure()) { LOGGER.info("Scheduling task retries, since the execution of a task failed."); scheduleTaskRetry(task, parameters); } }  void handleTaskRetries(Task task, Map<String, Object> parameters);  }