diff --git a/spring-batch-core/.springBeans b/spring-batch-core/.springBeans
index 8eb9665d6..8bb3a49b4 100644
--- a/spring-batch-core/.springBeans
+++ b/spring-batch-core/.springBeans
@@ -57,7 +57,6 @@
src/test/resources/org/springframework/batch/core/configuration/xml/StepParserBeanNameTests-context.xml
src/test/resources/org/springframework/batch/core/configuration/xml/StepParserTaskletAttributesTests-context.xml
src/test/resources/org/springframework/batch/core/configuration/xml/StopIncompleteJobParserTests-context.xml
- src/test/resources/org/springframework/batch/core/configuration/xml/StopRestartOnFailedStepJobParserTests-context.xml
diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StopRestartOnFailedStepJobParserTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StopRestartOnCompletedStepJobParserTests.java
similarity index 78%
rename from spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StopRestartOnFailedStepJobParserTests.java
rename to spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StopRestartOnCompletedStepJobParserTests.java
index d2e7e06e3..83ad9bfcc 100644
--- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StopRestartOnFailedStepJobParserTests.java
+++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/StopRestartOnCompletedStepJobParserTests.java
@@ -24,7 +24,6 @@ import org.springframework.batch.core.BatchStatus;
import org.springframework.batch.core.ExitStatus;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.StepExecution;
-import org.springframework.batch.core.job.flow.JobExecutionDecider;
import org.springframework.batch.core.repository.JobExecutionAlreadyRunningException;
import org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException;
import org.springframework.batch.core.repository.JobRestartException;
@@ -37,10 +36,10 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
*/
@ContextConfiguration
@RunWith(SpringJUnit4ClassRunner.class)
-public class StopRestartOnFailedStepJobParserTests extends AbstractJobParserTests {
+public class StopRestartOnCompletedStepJobParserTests extends AbstractJobParserTests {
@Test
- public void testStopIncomplete() throws Exception {
+ public void testStopRestartOnFailedStep() throws Exception {
//
// First Launch
@@ -60,20 +59,14 @@ public class StopRestartOnFailedStepJobParserTests extends AbstractJobParserTest
JobExecution jobExecution = createJobExecution();
job.execute(jobExecution);
assertEquals(1, stepNamesList.size());
- assertTrue(stepNamesList.contains("s1"));
+ assertTrue(stepNamesList.contains("fail"));
assertEquals(BatchStatus.INCOMPLETE, jobExecution.getStatus());
assertEquals(ExitStatus.FAILED.getExitCode(), jobExecution.getExitStatus().getExitCode());
- StepExecution stepExecution1 = getStepExecution(jobExecution, "s1");
- assertEquals(BatchStatus.COMPLETED, stepExecution1.getStatus());
- assertEquals(ExitStatus.COMPLETED.getExitCode(), stepExecution1.getExitStatus().getExitCode());
- }
-
- public static class TestDecider implements JobExecutionDecider {
- public String decide(JobExecution jobExecution, StepExecution stepExecution) {
- return "FOO";
- }
+ StepExecution stepExecution1 = getStepExecution(jobExecution, "fail");
+ assertEquals(BatchStatus.FAILED, stepExecution1.getStatus());
+ assertEquals(ExitStatus.FAILED.getExitCode(), stepExecution1.getExitStatus().getExitCode());
}
}
diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StopRestartOnFailedStepJobParserTests-context.xml b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StopRestartOnCompletedStepJobParserTests-context.xml
similarity index 86%
rename from spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StopRestartOnFailedStepJobParserTests-context.xml
rename to spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StopRestartOnCompletedStepJobParserTests-context.xml
index 2e8a93543..db0449e6c 100644
--- a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StopRestartOnFailedStepJobParserTests-context.xml
+++ b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/StopRestartOnCompletedStepJobParserTests-context.xml
@@ -6,8 +6,6 @@
-
-