* Test method for .
*/
@Test
public final void testPostFailure() {
final List<Exception> results = new ArrayList<Exception>();
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) {
// no-op
}
assertEquals(7, results.size());
}