RESOLVED - BATCH-654: Transactions when commit fails

ItemOrientedStep now detects failed commit and dies asap instead of trying to rollback
This commit is contained in:
robokaso
2008-06-06 12:49:32 +00:00
parent 7df20a9902
commit 61c21ed663
3 changed files with 21 additions and 7 deletions

View File

@@ -654,9 +654,9 @@ public class ItemOrientedStepTests extends TestCase {
catch (RuntimeException ex) {
assertEquals(BatchStatus.UNKNOWN, stepExecution.getStatus());
String msg = stepExecution.getExitStatus().getExitDescription();
assertTrue(msg.contains("Fatal error detected during commit"));
assertTrue(msg.contains("Fatal error detected during commit - the execution is in undefined state and restart will not be possible"));
msg = ex.getMessage();
assertTrue(msg.contains("Fatal error detected during commit"));
assertTrue(msg.contains("Fatal error detected during commit - the execution is in undefined state and restart will not be possible"));
// The original rollback was caused by this one:
assertEquals("Bar", ex.getCause().getMessage());
}