BATCH-1064: Changed BatchStatus.FAILED to BatchStatus.INCOMPLETE where necessary
This commit is contained in:
@@ -352,7 +352,7 @@ public class SimpleJobTests {
|
||||
job.execute(jobExecution);
|
||||
|
||||
assertEquals(0, list.size());
|
||||
checkRepository(BatchStatus.FAILED, ExitStatus.NOOP);
|
||||
checkRepository(BatchStatus.INCOMPLETE, ExitStatus.NOOP);
|
||||
ExitStatus exitStatus = jobExecution.getExitStatus();
|
||||
assertEquals(ExitStatus.NOOP.getExitCode(), exitStatus.getExitCode());
|
||||
}
|
||||
@@ -548,7 +548,7 @@ public class SimpleJobTests {
|
||||
}
|
||||
if (exception instanceof JobInterruptedException) {
|
||||
stepExecution.setExitStatus(ExitStatus.FAILED);
|
||||
stepExecution.setStatus(BatchStatus.FAILED);
|
||||
stepExecution.setStatus(BatchStatus.STOPPING);
|
||||
stepExecution.addFailureException(exception);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ public class AbstractStepTests {
|
||||
tested.setStepExecutionListeners(new StepExecutionListener[] { listener1, listener2 });
|
||||
|
||||
tested.execute(execution);
|
||||
assertEquals(BatchStatus.FAILED, execution.getStatus());
|
||||
assertEquals(BatchStatus.INCOMPLETE, execution.getStatus());
|
||||
Throwable expected = execution.getFailureExceptions().get(0);
|
||||
assertEquals("JobExecution interrupted.", expected.getMessage());
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ public class TaskletStepExceptionTests {
|
||||
public void testInterrupted() throws Exception {
|
||||
taskletStep.setStepExecutionListeners(new StepExecutionListener[] { new InterruptionListener() });
|
||||
taskletStep.execute(stepExecution);
|
||||
assertEquals(FAILED, stepExecution.getStatus());
|
||||
assertEquals(INCOMPLETE, stepExecution.getStatus());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -114,7 +114,7 @@ public class StepExecutorInterruptionTests extends TestCase {
|
||||
|
||||
assertTrue("Timed out waiting for step to be interrupted.", count < 1000);
|
||||
assertFalse(processingThread.isAlive());
|
||||
assertEquals(BatchStatus.FAILED, stepExecution.getStatus());
|
||||
assertEquals(BatchStatus.INCOMPLETE, stepExecution.getStatus());
|
||||
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ public class StepExecutorInterruptionTests extends TestCase {
|
||||
|
||||
assertTrue("Timed out waiting for step to be interrupted.", count < 1000);
|
||||
assertFalse(processingThread.isAlive());
|
||||
assertEquals(BatchStatus.FAILED, stepExecution.getStatus());
|
||||
assertEquals(BatchStatus.INCOMPLETE, stepExecution.getStatus());
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -541,7 +541,7 @@ public class TaskletStepTests {
|
||||
stepExecution.setExecutionContext(foobarEc);
|
||||
|
||||
step.execute(stepExecution);
|
||||
assertEquals(BatchStatus.FAILED, stepExecution.getStatus());
|
||||
assertEquals(BatchStatus.INCOMPLETE, stepExecution.getStatus());
|
||||
String msg = stepExecution.getExitStatus().getExitDescription();
|
||||
assertTrue("Message does not contain 'JobInterruptedException': " + msg, contains(msg,
|
||||
"JobInterruptedException"));
|
||||
|
||||
Reference in New Issue
Block a user