use of org.activiti.engine.impl.interceptor.CommandInvoker in project Activiti by Activiti.
the class RetryInterceptorTest method testRetryInterceptor.
public void testRetryInterceptor() {
RetryInterceptor retryInterceptor = new RetryInterceptor();
retryInterceptor.setNext(new CommandInvoker());
try {
retryInterceptor.execute(new CommandConfig(), new CommandThrowingOptimisticLockingException());
fail("ActivitiException expected.");
} catch (ActivitiException e) {
assertTrue(e.getMessage().contains(retryInterceptor.getNumOfRetries() + " retries failed"));
}
}
Aggregations