@Test void testPostFailure() { final List<Exception> results = new ArrayList<>(); RetryHandler handler = new ExceptionRetryHandler( exceptionClasses, proxy, schedule, 7) { @Override public void postFailure(Exception ex, int retryCount) { super.postFailure(ex, retryCount); results.add(ex); } @Override public Object operation() throws Exception { throw new Exception(); } }; try { handler.perform(); } catch (Exception ex) { } assertThat(results.size()).isEqualTo(7); }
@Override public void postFailure(Exception ex, int retryCount) { }
ExceptionRetryHandler implements RetryHandler { @Override public void postFailure(Exception ex, int retryCount) { } }
ExceptionRetryHandler implements RetryHandler { @Override public void postFailure(Exception ex, int retryCount) { } private  ExceptionRetryHandler();  ExceptionRetryHandler(Class<?>[] exceptionClasses, ExceptionRetryingProxy proxy, RetrySchedule schedule, int maxRetries); }
ExceptionRetryHandler implements RetryHandler { @Override public void postFailure(Exception ex, int retryCount) { } private  ExceptionRetryHandler();  ExceptionRetryHandler(Class<?>[] exceptionClasses, ExceptionRetryingProxy proxy, RetrySchedule schedule, int maxRetries); @Override Object perform(); @Override void postFailure(Exception ex, int retryCount); @Override abstract Object operation(); long getRetryInterval(int retryCount); }
ExceptionRetryHandler implements RetryHandler { @Override public void postFailure(Exception ex, int retryCount) { } private  ExceptionRetryHandler();  ExceptionRetryHandler(Class<?>[] exceptionClasses, ExceptionRetryingProxy proxy, RetrySchedule schedule, int maxRetries); @Override Object perform(); @Override void postFailure(Exception ex, int retryCount); @Override abstract Object operation(); long getRetryInterval(int retryCount);  }