IN PROGRESS - BATCH-805: Check noRollbackFor semantics in item/chunk oriented tasklets
some more exception logging and assertions
This commit is contained in:
@@ -481,6 +481,9 @@ public class SkipLimitStepFactoryBean<T, S> extends SimpleStepFactoryBean<T, S>
|
||||
if (rollbackClassifier.classify(e)) {
|
||||
throw e;
|
||||
}
|
||||
else {
|
||||
logger.error("Exception encountered that does not classify for rollback: ", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -323,6 +323,9 @@ public class SkipLimitStepFactoryBeanTests {
|
||||
// skipped 2,3,4,5
|
||||
List<String> expectedOutput = Arrays.asList(StringUtils.commaDelimitedListToStringArray("1,6"));
|
||||
assertEquals(expectedOutput, writer.written);
|
||||
|
||||
// reader exceptions should not cause rollback, 1 writer exception causes 2 rollbacks
|
||||
assertEquals(2, stepExecution.getRollbackCount());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@ import org.springframework.batch.core.repository.dao.MapStepExecutionDao;
|
||||
import org.springframework.batch.core.repository.support.SimpleJobRepository;
|
||||
import org.springframework.batch.core.step.JobRepositorySupport;
|
||||
import org.springframework.batch.core.step.StepInterruptionPolicy;
|
||||
import org.springframework.batch.core.step.tasklet.TaskletStep;
|
||||
import org.springframework.batch.item.ExecutionContext;
|
||||
import org.springframework.batch.item.ItemReader;
|
||||
import org.springframework.batch.item.ItemStream;
|
||||
|
||||
Reference in New Issue
Block a user