IN PROGRESS - BATCH-929: Deferrable Constraints cause unrecoverable errors

count non-fatal commit failure as rollback
This commit is contained in:
robokaso
2008-11-19 13:01:40 +00:00
parent b094db633b
commit df1e4a4605
3 changed files with 27 additions and 5 deletions

View File

@@ -199,7 +199,7 @@ public class TaskletStepExceptionTests {
* status and execution context should be rolled back.
*/
@Test
public void testSkippableCommitError() throws Exception {
public void testNonFatalCommitError() throws Exception {
class TestItemStream extends ItemStreamSupport {
private boolean called = false;
@@ -240,6 +240,7 @@ public class TaskletStepExceptionTests {
assertEquals("step won't refuse to restart", FAILED, stepExecution.getStatus());
assertTrue("execution context modified", stream.called);
assertTrue("execution context rolled back", stepExecution.getExecutionContext().isEmpty());
assertEquals("failed commit counted as rollback", 1, stepExecution.getRollbackCount());
}
@Test