IN PROGRESS - BATCH-805: Check noRollbackFor semantics in item/chunk oriented tasklets

some more exception logging and assertions
This commit is contained in:
robokaso
2008-09-10 08:32:33 +00:00
parent fa7f809fe6
commit 64a85c578a
3 changed files with 6 additions and 1 deletions

View File

@@ -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());
}

View File

@@ -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;