RESOLVED - BATCH-434 and BATCH-438 ExitStatus cleaned up (postponed commit from friday)
This commit is contained in:
@@ -234,7 +234,7 @@ public class SimpleJobTests extends TestCase {
|
||||
assertEquals(exception, e.getCause());
|
||||
}
|
||||
assertEquals(0, list.size());
|
||||
checkRepository(BatchStatus.STOPPED, ExitStatus.INTERRUPTED);
|
||||
checkRepository(BatchStatus.STOPPED, ExitStatus.FAILED);
|
||||
}
|
||||
|
||||
public void testFailed() throws Exception {
|
||||
@@ -355,7 +355,7 @@ public class SimpleJobTests extends TestCase {
|
||||
throw (RuntimeException) exception;
|
||||
}
|
||||
if (exception instanceof JobInterruptedException) {
|
||||
stepExecution.setExitStatus(ExitStatus.INTERRUPTED);
|
||||
stepExecution.setExitStatus(ExitStatus.FAILED);
|
||||
throw (JobInterruptedException) exception;
|
||||
}
|
||||
if (runnable != null) {
|
||||
|
||||
@@ -28,12 +28,6 @@ import org.springframework.util.StringUtils;
|
||||
*/
|
||||
public class ExitStatus implements Serializable {
|
||||
|
||||
/**
|
||||
* Convenient constant value for when we detect that processing is underway.
|
||||
* Used mainly by asynchronous launchers.
|
||||
*/
|
||||
public static final ExitStatus RUNNING = new ExitStatus(true, "RUNNING");
|
||||
|
||||
/**
|
||||
* Convenient constant value representing unknown state - assumed
|
||||
* continuable.
|
||||
@@ -50,11 +44,6 @@ public class ExitStatus implements Serializable {
|
||||
*/
|
||||
public static final ExitStatus FINISHED = new ExitStatus(false, "COMPLETED");
|
||||
|
||||
/**
|
||||
* Convenient constant value representing interrupted processing.
|
||||
*/
|
||||
public static final ExitStatus INTERRUPTED = new ExitStatus(false, "INTERRUPTED");
|
||||
|
||||
/**
|
||||
* Convenient constant value representing job that did no processing (e.g.
|
||||
* because it was already complete).
|
||||
|
||||
@@ -189,11 +189,6 @@ public class ExitStatusTests extends TestCase {
|
||||
assertEquals("Bar", status.getExitDescription());
|
||||
}
|
||||
|
||||
public void testRunningIsRunning() throws Exception {
|
||||
assertTrue(ExitStatus.RUNNING.isRunning());
|
||||
assertTrue(new ExitStatus(true, "RUNNING").isRunning());
|
||||
}
|
||||
|
||||
public void testUnkownIsRunning() throws Exception {
|
||||
assertTrue(ExitStatus.UNKNOWN.isRunning());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user