targetMethod = "commit",
action = "throw new IOException(\"File not found!\")",
name = "commitError")
public void testErrorHandling() throws Exception {
writeData( sfAsyncExclusiveIndex, 2 );
final CountingErrorHandler errorHandler = (CountingErrorHandler) sfAsyncExclusiveIndex.getSearchFactory().getErrorHandler();
assertConditionMet( new Condition() {
@Override
public boolean evaluate() {
return errorHandler.getCountFor( IOException.class ) >= 2;
}
} );
}