diff --git a/archetypes/simple-cli/src/test/java/example/ExampleJobConfigurationTests.java b/archetypes/simple-cli/src/test/java/example/ExampleJobConfigurationTests.java
index b2d85cbd4..cc2a8456b 100644
--- a/archetypes/simple-cli/src/test/java/example/ExampleJobConfigurationTests.java
+++ b/archetypes/simple-cli/src/test/java/example/ExampleJobConfigurationTests.java
@@ -24,7 +24,7 @@ import org.springframework.batch.core.BatchStatus;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobInstance;
import org.springframework.batch.core.launch.JobOperator;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -37,7 +37,7 @@ public class ExampleJobConfigurationTests {
private JobOperator jobOperator;
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
/**
* Create a unique job instance and check it's execution completes
@@ -47,7 +47,7 @@ public class ExampleJobConfigurationTests {
@Test
public void testLaunchJob() throws Exception {
- JobExecution jobExecution = jobRunnerUtils.launchJob(jobRunnerUtils.getUniqueJobParameters());
+ JobExecution jobExecution = jobLauncherTestUtils.launchJob(jobLauncherTestUtils.getUniqueJobParameters());
assertEquals(BatchStatus.COMPLETED, jobExecution.getStatus());
}
@@ -59,7 +59,7 @@ public class ExampleJobConfigurationTests {
public void testLaunchByJobOperator() throws Exception {
// assumes the job has a JobIncrementer set
- long jobExecutionId = jobOperator.startNextInstance(jobRunnerUtils.getJob().getName());
+ long jobExecutionId = jobOperator.startNextInstance(jobLauncherTestUtils.getJob().getName());
// no need to wait for job completion in this case, the job is launched
// synchronously
diff --git a/archetypes/simple-cli/src/test/resources/test-context.xml b/archetypes/simple-cli/src/test/resources/test-context.xml
index 6f3d020a0..6a1e91f38 100644
--- a/archetypes/simple-cli/src/test/resources/test-context.xml
+++ b/archetypes/simple-cli/src/test/resources/test-context.xml
@@ -8,6 +8,6 @@
-
+
diff --git a/spring-batch-core/.classpath b/spring-batch-core/.classpath
index 3314635d4..6886233c2 100644
--- a/spring-batch-core/.classpath
+++ b/spring-batch-core/.classpath
@@ -1,9 +1,9 @@
-
+
-
+
diff --git a/spring-batch-core/.project b/spring-batch-core/.project
index 48beb3161..1476a28e0 100644
--- a/spring-batch-core/.project
+++ b/spring-batch-core/.project
@@ -22,6 +22,11 @@
+
+ org.maven.ide.eclipse.maven2Builder
+
+
+
org.eclipse.jem.workbench.JavaEMFNature
diff --git a/spring-batch-core/.settings/org.maven.ide.eclipse.prefs b/spring-batch-core/.settings/org.maven.ide.eclipse.prefs
index 2c8a54873..883307d5e 100644
--- a/spring-batch-core/.settings/org.maven.ide.eclipse.prefs
+++ b/spring-batch-core/.settings/org.maven.ide.eclipse.prefs
@@ -1,9 +1,9 @@
-#Thu Nov 12 12:13:53 GMT 2009
-activeProfiles=
-eclipse.preferences.version=1
-fullBuildGoals=process-test-resources
-includeModules=false
-resolveWorkspaceProjects=true
-resourceFilterGoals=process-resources resources\:testResources
-skipCompilerPlugin=true
-version=1
+#Sun Nov 29 15:48:27 GMT 2009
+activeProfiles=spring3
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/BeanWrapperMapperSampleJobFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/BeanWrapperMapperSampleJobFunctionalTests.java
index 07e014fa3..dcae66d72 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/BeanWrapperMapperSampleJobFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/BeanWrapperMapperSampleJobFunctionalTests.java
@@ -18,7 +18,7 @@ package org.springframework.batch.sample;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -29,12 +29,12 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
public class BeanWrapperMapperSampleJobFunctionalTests {
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
@Test
public void testJobLaunch() throws Exception {
- jobRunnerUtils.launchJob();
+ jobLauncherTestUtils.launchJob();
}
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/CompositeItemWriterSampleFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/CompositeItemWriterSampleFunctionalTests.java
index feaa0dfec..4b038499f 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/CompositeItemWriterSampleFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/CompositeItemWriterSampleFunctionalTests.java
@@ -16,7 +16,7 @@ import org.apache.commons.io.IOUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.batch.sample.domain.trade.Trade;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.RowCallbackHandler;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
@@ -38,7 +38,7 @@ public class CompositeItemWriterSampleFunctionalTests {
private SimpleJdbcTemplate simpleJdbcTemplate;
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
@Autowired
public void setDataSource(DataSource dataSource) {
@@ -51,7 +51,7 @@ public class CompositeItemWriterSampleFunctionalTests {
simpleJdbcTemplate.update("DELETE from TRADE");
int before = simpleJdbcTemplate.queryForInt("SELECT COUNT(*) from TRADE");
- jobRunnerUtils.launchJob();
+ jobLauncherTestUtils.launchJob();
checkOutputFile("target/test-outputs/CustomerReport1.txt");
checkOutputFile("target/test-outputs/CustomerReport2.txt");
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/CustomerFilterJobFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/CustomerFilterJobFunctionalTests.java
index 34df1a180..3907a0dd9 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/CustomerFilterJobFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/CustomerFilterJobFunctionalTests.java
@@ -32,7 +32,7 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.batch.core.JobExecution;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.RowCallbackHandler;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
@@ -52,7 +52,7 @@ public class CustomerFilterJobFunctionalTests {
private Map credits = new HashMap();
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
@Autowired
public void setDataSource(DataSource dataSource) {
@@ -79,7 +79,7 @@ public class CustomerFilterJobFunctionalTests {
@Test
public void testFilterJob() throws Exception {
- JobExecution jobExecution = jobRunnerUtils.launchJob();
+ JobExecution jobExecution = jobLauncherTestUtils.launchJob();
customers = Arrays.asList(new Customer("customer1", (credits.get("customer1"))), new Customer("customer2",
(credits.get("customer2"))), new Customer("customer3", 100500), new Customer("customer4", credits
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/DatabaseShutdownFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/DatabaseShutdownFunctionalTests.java
index f787c7fda..3ee2b8568 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/DatabaseShutdownFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/DatabaseShutdownFunctionalTests.java
@@ -28,7 +28,7 @@ import org.junit.runner.RunWith;
import org.springframework.batch.core.BatchStatus;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.launch.JobOperator;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -51,12 +51,12 @@ public class DatabaseShutdownFunctionalTests {
private JobOperator jobOperator;
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
@Test
public void testLaunchJob() throws Exception {
- JobExecution jobExecution = jobRunnerUtils.launchJob();
+ JobExecution jobExecution = jobLauncherTestUtils.launchJob();
Thread.sleep(1000);
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/DelegatingJobFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/DelegatingJobFunctionalTests.java
index e809f304c..d03ca853c 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/DelegatingJobFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/DelegatingJobFunctionalTests.java
@@ -6,7 +6,7 @@ import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.batch.sample.domain.person.PersonService;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -16,7 +16,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
public class DelegatingJobFunctionalTests {
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
@Autowired
private PersonService personService;
@@ -24,7 +24,7 @@ public class DelegatingJobFunctionalTests {
@Test
public void testLaunchJob() throws Exception {
- jobRunnerUtils.launchJob();
+ jobLauncherTestUtils.launchJob();
assertTrue(personService.getReturnedCount() > 0);
assertEquals(personService.getReturnedCount(), personService.getReceivedCount());
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/FootballJobFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/FootballJobFunctionalTests.java
index 24e22395f..ac023dedb 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/FootballJobFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/FootballJobFunctionalTests.java
@@ -6,7 +6,7 @@ import javax.sql.DataSource;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import org.springframework.test.context.ContextConfiguration;
@@ -17,7 +17,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
public class FootballJobFunctionalTests {
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
private SimpleJdbcTemplate simpleJdbcTemplate;
@@ -33,7 +33,7 @@ public class FootballJobFunctionalTests {
simpleJdbcTemplate.update("DELETE FROM GAMES");
simpleJdbcTemplate.update("DELETE FROM PLAYER_SUMMARY");
- jobRunnerUtils.launchJob();
+ jobLauncherTestUtils.launchJob();
int count = simpleJdbcTemplate.queryForInt("SELECT COUNT(*) from PLAYER_SUMMARY");
assertTrue(count > 0);
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/GracefulShutdownFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/GracefulShutdownFunctionalTests.java
index 5c23e0a07..62f5afd54 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/GracefulShutdownFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/GracefulShutdownFunctionalTests.java
@@ -28,7 +28,7 @@ import org.springframework.batch.core.BatchStatus;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.JobParametersBuilder;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -48,7 +48,7 @@ public class GracefulShutdownFunctionalTests {
private final Log logger = LogFactory.getLog(getClass());
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
@Test
public void testLaunchJob() throws Exception {
@@ -56,7 +56,7 @@ public class GracefulShutdownFunctionalTests {
final JobParameters jobParameters = new JobParametersBuilder().addLong("timestamp", System.currentTimeMillis())
.toJobParameters();
- JobExecution jobExecution = jobRunnerUtils.launchJob(jobParameters);
+ JobExecution jobExecution = jobLauncherTestUtils.launchJob(jobParameters);
Thread.sleep(1000);
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/GroovyJobFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/GroovyJobFunctionalTests.java
index 0bd309962..38dbfc801 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/GroovyJobFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/GroovyJobFunctionalTests.java
@@ -26,7 +26,7 @@ import org.apache.commons.io.FileUtils;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -37,7 +37,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
public class GroovyJobFunctionalTests {
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
@Before
public void removeOldData() throws IOException {
@@ -47,7 +47,7 @@ public class GroovyJobFunctionalTests {
@Test
public void testLaunchJob() throws Exception {
assertFalse(new File("target/groovyJob/output/files.zip").exists());
- jobRunnerUtils.launchJob();
+ jobLauncherTestUtils.launchJob();
assertTrue(new File("target/groovyJob/output/files.zip").exists());
}
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/HeaderFooterSampleFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/HeaderFooterSampleFunctionalTests.java
index 2609ccb0a..35c3652c0 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/HeaderFooterSampleFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/HeaderFooterSampleFunctionalTests.java
@@ -7,7 +7,7 @@ import java.io.FileReader;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.core.io.Resource;
@@ -27,11 +27,11 @@ public class HeaderFooterSampleFunctionalTests {
private Resource output;
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
@Test
public void testJob() throws Exception {
- jobRunnerUtils.launchJob();
+ jobLauncherTestUtils.launchJob();
BufferedReader inputReader = new BufferedReader(new FileReader(input.getFile()));
BufferedReader outputReader = new BufferedReader(new FileReader(output.getFile()));
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/HibernateFailureJobFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/HibernateFailureJobFunctionalTests.java
index 6a8280a5e..d3b7312d7 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/HibernateFailureJobFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/HibernateFailureJobFunctionalTests.java
@@ -17,7 +17,7 @@ import org.springframework.batch.core.JobParameters;
import org.springframework.batch.core.JobParametersBuilder;
import org.springframework.batch.sample.domain.trade.internal.CustomerCreditIncreaseProcessor;
import org.springframework.batch.sample.domain.trade.internal.HibernateCreditDao;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.UncategorizedSQLException;
import org.springframework.jdbc.core.RowCallbackHandler;
@@ -67,7 +67,7 @@ public class HibernateFailureJobFunctionalTests {
private List creditsBeforeUpdate;
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
@Autowired
public void setDataSource(DataSource dataSource) {
@@ -88,7 +88,7 @@ public class HibernateFailureJobFunctionalTests {
writer.setFailOnFlush(2);
try {
- jobRunnerUtils.launchJob(params);
+ jobLauncherTestUtils.launchJob(params);
} catch (HibernateJdbcException e) {
// This is what would happen if the flush happened outside the
// RepeatContext:
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/JobStepFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/JobStepFunctionalTests.java
index fed7137d9..68e2e07e9 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/JobStepFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/JobStepFunctionalTests.java
@@ -24,7 +24,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.batch.core.converter.DefaultJobParametersConverter;
import org.springframework.batch.support.PropertiesConverter;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import org.springframework.test.context.ContextConfiguration;
@@ -40,7 +40,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
public class JobStepFunctionalTests {
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
// auto-injected attributes
private SimpleJdbcTemplate simpleJdbcTemplate;
@@ -55,7 +55,7 @@ public class JobStepFunctionalTests {
simpleJdbcTemplate.update("DELETE FROM TRADE");
- jobRunnerUtils.launchJob(new DefaultJobParametersConverter()
+ jobLauncherTestUtils.launchJob(new DefaultJobParametersConverter()
.getJobParameters(PropertiesConverter
.stringToProperties("run.id(long)=1,parameter=true,run.date=20070122,input.file=classpath:data/fixedLengthImportJob/input/20070122.teststream.ImportTradeDataStep.txt")));
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/LoopFlowSampleFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/LoopFlowSampleFunctionalTests.java
index 597040cf8..5c34f61d3 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/LoopFlowSampleFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/LoopFlowSampleFunctionalTests.java
@@ -20,7 +20,7 @@ import static org.junit.Assert.assertEquals;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.batch.sample.domain.trade.internal.ItemTrackingTradeItemWriter;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -40,11 +40,11 @@ public class LoopFlowSampleFunctionalTests {
private ItemTrackingTradeItemWriter itemWriter;
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
@Test
public void testJobLaunch() throws Exception {
- jobRunnerUtils.launchJob();
+ jobLauncherTestUtils.launchJob();
// items processed = items read + 2 exceptions
assertEquals(10, itemWriter.getItems().size());
}
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/MultilineJobFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/MultilineJobFunctionalTests.java
index 9aa289201..4bf8c4a55 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/MultilineJobFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/MultilineJobFunctionalTests.java
@@ -21,7 +21,7 @@ import static org.junit.Assert.assertEquals;
import org.apache.commons.io.IOUtils;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.io.Resource;
@@ -35,7 +35,7 @@ import org.springframework.util.StringUtils;
public class MultilineJobFunctionalTests {
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
// The output is grouped together in two lines, instead of all the
// trades coming out on a single line.
@@ -46,7 +46,7 @@ public class MultilineJobFunctionalTests {
@Test
public void testJobLaunch() throws Exception {
- jobRunnerUtils.launchJob();
+ jobLauncherTestUtils.launchJob();
assertEquals(EXPECTED_RESULT, StringUtils.replace(IOUtils.toString(output.getInputStream()), System
.getProperty("line.separator"), ""));
}
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/MultilineOrderJobFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/MultilineOrderJobFunctionalTests.java
index 158a4b31d..8ec71f390 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/MultilineOrderJobFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/MultilineOrderJobFunctionalTests.java
@@ -20,7 +20,7 @@ import static org.springframework.batch.test.AssertFile.assertFileEquals;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.FileSystemResource;
@@ -36,11 +36,11 @@ public class MultilineOrderJobFunctionalTests {
private static final String EXPECTED = "data/multilineOrderJob/result/multilineOrderOutput.txt";
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
@Test
public void testJobLaunch() throws Exception {
- jobRunnerUtils.launchJob();
+ jobLauncherTestUtils.launchJob();
assertFileEquals(new ClassPathResource(EXPECTED), new FileSystemResource(ACTUAL));
}
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/PartitionFileJobFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/PartitionFileJobFunctionalTests.java
index 030e93bee..de7fe3241 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/PartitionFileJobFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/PartitionFileJobFunctionalTests.java
@@ -33,7 +33,7 @@ import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.sample.domain.trade.CustomerCredit;
import org.springframework.batch.sample.domain.trade.internal.CustomerCreditIncreaseProcessor;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
@@ -52,7 +52,7 @@ public class PartitionFileJobFunctionalTests implements ApplicationContextAware
private ItemReader inputReader;
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
private ApplicationContext applicationContext;
@@ -74,7 +74,7 @@ public class PartitionFileJobFunctionalTests implements ApplicationContextAware
List inputs = new ArrayList(getCredits(inputReader));
close(inputReader);
- JobExecution jobExecution = jobRunnerUtils.launchJob();
+ JobExecution jobExecution = jobLauncherTestUtils.launchJob();
assertEquals(BatchStatus.COMPLETED, jobExecution.getStatus());
@SuppressWarnings("unchecked")
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/PartitionJdbcJobFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/PartitionJdbcJobFunctionalTests.java
index 8a18b24b6..705e30ae0 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/PartitionJdbcJobFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/PartitionJdbcJobFunctionalTests.java
@@ -33,7 +33,7 @@ import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.sample.domain.trade.CustomerCredit;
import org.springframework.batch.sample.domain.trade.internal.CustomerCreditIncreaseProcessor;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
@@ -52,7 +52,7 @@ public class PartitionJdbcJobFunctionalTests implements ApplicationContextAware
private ItemReader inputReader;
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
private ApplicationContext applicationContext;
@@ -74,7 +74,7 @@ public class PartitionJdbcJobFunctionalTests implements ApplicationContextAware
List inputs = new ArrayList(getCredits(inputReader));
close(inputReader);
- JobExecution jobExecution = jobRunnerUtils.launchJob();
+ JobExecution jobExecution = jobLauncherTestUtils.launchJob();
assertEquals(BatchStatus.COMPLETED, jobExecution.getStatus());
@SuppressWarnings("unchecked")
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/RestartFileSampleFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/RestartFileSampleFunctionalTests.java
index 8d924c1ca..78ecaca31 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/RestartFileSampleFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/RestartFileSampleFunctionalTests.java
@@ -28,7 +28,7 @@ import org.springframework.batch.core.JobParameters;
import org.springframework.batch.item.file.FlatFileItemWriter;
import org.springframework.batch.sample.domain.trade.CustomerCredit;
import org.springframework.batch.test.AssertFile;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.Resource;
import org.springframework.test.context.ContextConfiguration;
@@ -47,17 +47,17 @@ public class RestartFileSampleFunctionalTests {
private Resource outputResource;
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
@Test
public void runTest() throws Exception {
- JobParameters jobParameters = jobRunnerUtils.getUniqueJobParameters();
+ JobParameters jobParameters = jobLauncherTestUtils.getUniqueJobParameters();
- JobExecution je1 = jobRunnerUtils.launchJob(jobParameters);
+ JobExecution je1 = jobLauncherTestUtils.launchJob(jobParameters);
assertEquals(BatchStatus.FAILED, je1.getStatus());
AssertFile.assertLineCount(10, outputResource);
- JobExecution je2 = jobRunnerUtils.launchJob(jobParameters);
+ JobExecution je2 = jobLauncherTestUtils.launchJob(jobParameters);
assertEquals(BatchStatus.COMPLETED, je2.getStatus());
AssertFile.assertLineCount(20, outputResource);
}
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/RestartFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/RestartFunctionalTests.java
index 105fccf63..637a631fa 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/RestartFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/RestartFunctionalTests.java
@@ -26,7 +26,7 @@ import org.springframework.batch.core.BatchStatus;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.converter.DefaultJobParametersConverter;
import org.springframework.batch.support.PropertiesConverter;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
import org.springframework.test.context.ContextConfiguration;
@@ -45,7 +45,7 @@ import org.springframework.test.context.transaction.BeforeTransaction;
public class RestartFunctionalTests {
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
// auto-injected attributes
private SimpleJdbcTemplate simpleJdbcTemplate;
@@ -99,7 +99,7 @@ public class RestartFunctionalTests {
// load the application context and launch the job
private JobExecution runJobForRestartTest() throws Exception {
- return jobRunnerUtils
+ return jobLauncherTestUtils
.launchJob(new DefaultJobParametersConverter()
.getJobParameters(PropertiesConverter
.stringToProperties("run.id(long)=1,parameter=true,run.date=20070122,input.file=classpath:data/fixedLengthImportJob/input/20070122.teststream.ImportTradeDataStep.txt")));
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/RetrySampleFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/RetrySampleFunctionalTests.java
index 2ba00a050..bc0da463e 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/RetrySampleFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/RetrySampleFunctionalTests.java
@@ -6,7 +6,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.batch.sample.domain.trade.internal.GeneratingTradeItemReader;
import org.springframework.batch.sample.support.RetrySampleItemWriter;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -28,11 +28,11 @@ public class RetrySampleFunctionalTests {
private RetrySampleItemWriter> itemProcessor;
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
@Test
public void testLaunchJob() throws Exception {
- jobRunnerUtils.launchJob();
+ jobLauncherTestUtils.launchJob();
//items processed = items read + 2 exceptions
assertEquals(itemGenerator.getLimit()+2, itemProcessor.getCounter());
}
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/TaskletJobFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/TaskletJobFunctionalTests.java
index 3ccc18480..28b236a38 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/TaskletJobFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/TaskletJobFunctionalTests.java
@@ -23,7 +23,7 @@ import org.junit.runner.RunWith;
import org.springframework.batch.core.BatchStatus;
import org.springframework.batch.core.JobExecution;
import org.springframework.batch.core.JobParametersBuilder;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
@@ -34,11 +34,11 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
public class TaskletJobFunctionalTests {
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
@Test
public void testLaunchJob() throws Exception {
- JobExecution jobExecution = jobRunnerUtils.launchJob(new JobParametersBuilder().addString("value", "foo")
+ JobExecution jobExecution = jobLauncherTestUtils.launchJob(new JobParametersBuilder().addString("value", "foo")
.toJobParameters());
assertEquals(BatchStatus.COMPLETED, jobExecution.getStatus());
}
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/TradeJobFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/TradeJobFunctionalTests.java
index 45830e656..682981d40 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/TradeJobFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/TradeJobFunctionalTests.java
@@ -34,7 +34,7 @@ import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.batch.sample.domain.trade.Trade;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.RowCallbackHandler;
import org.springframework.jdbc.core.simple.SimpleJdbcTemplate;
@@ -57,7 +57,7 @@ public class TradeJobFunctionalTests {
private Map credits = new HashMap();
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
@Autowired
public void setDataSource(DataSource dataSource) {
@@ -81,7 +81,7 @@ public class TradeJobFunctionalTests {
@Test
public void testLaunchJob() throws Exception {
- jobRunnerUtils.launchJob();
+ jobLauncherTestUtils.launchJob();
customers = Arrays.asList(new Customer("customer1", (credits.get("customer1") - 98.34)),
new Customer("customer2", (credits.get("customer2") - 18.12 - 12.78)),
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/AbstractIoSampleTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/AbstractIoSampleTests.java
index ec85b3005..72882c93b 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/AbstractIoSampleTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/AbstractIoSampleTests.java
@@ -15,7 +15,7 @@ import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemStream;
import org.springframework.batch.sample.domain.trade.CustomerCredit;
import org.springframework.batch.sample.domain.trade.internal.CustomerCreditIncreaseProcessor;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
@@ -30,7 +30,7 @@ import org.springframework.test.context.ContextConfiguration;
public abstract class AbstractIoSampleTests {
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
@Autowired
private ItemReader reader;
@@ -46,7 +46,7 @@ public abstract class AbstractIoSampleTests {
List inputs = getCredits(reader);
close(reader);
- JobExecution jobExecution = jobRunnerUtils.launchJob(getUniqueJobParameters());
+ JobExecution jobExecution = jobLauncherTestUtils.launchJob(getUniqueJobParameters());
assertEquals(BatchStatus.COMPLETED, jobExecution.getStatus());
pointReaderToOutput(reader);
@@ -66,7 +66,7 @@ public abstract class AbstractIoSampleTests {
}
protected JobParameters getUniqueJobParameters() {
- return jobRunnerUtils.getUniqueJobParameters();
+ return jobLauncherTestUtils.getUniqueJobParameters();
}
/**
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/MultiLineFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/MultiLineFunctionalTests.java
index 8a3229ada..bec139e0d 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/MultiLineFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/MultiLineFunctionalTests.java
@@ -19,7 +19,7 @@ package org.springframework.batch.sample.iosample;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.batch.test.AssertFile;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.FileSystemResource;
import org.springframework.test.context.ContextConfiguration;
@@ -39,14 +39,14 @@ public class MultiLineFunctionalTests {
private static final String INPUT_FILE = "src/main/resources/data/iosample/input/multiLine.txt";
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
/**
* Output should be the same as input
*/
@Test
public void testJob() throws Exception {
- jobRunnerUtils.launchJob();
+ jobLauncherTestUtils.launchJob();
AssertFile.assertFileEquals(new FileSystemResource(INPUT_FILE), new FileSystemResource(OUTPUT_FILE));
}
}
diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/MultiRecordTypeFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/MultiRecordTypeFunctionalTests.java
index 74ca37ad7..eb4785850 100644
--- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/MultiRecordTypeFunctionalTests.java
+++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/iosample/MultiRecordTypeFunctionalTests.java
@@ -19,7 +19,7 @@ package org.springframework.batch.sample.iosample;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.batch.test.AssertFile;
-import org.springframework.batch.test.JobRunnerTestUtils;
+import org.springframework.batch.test.JobLauncherTestUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.FileSystemResource;
import org.springframework.test.context.ContextConfiguration;
@@ -39,14 +39,14 @@ public class MultiRecordTypeFunctionalTests {
private static final String INPUT_FILE = "src/main/resources/data/iosample/input/multiRecordType.txt";
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
/**
* Output should be the same as input
*/
@Test
public void testJob() throws Exception {
- jobRunnerUtils.launchJob();
+ jobLauncherTestUtils.launchJob();
AssertFile.assertFileEquals(new FileSystemResource(INPUT_FILE), new FileSystemResource(OUTPUT_FILE));
}
}
diff --git a/spring-batch-samples/src/test/resources/job-runner-context.xml b/spring-batch-samples/src/test/resources/job-runner-context.xml
index e058c2d45..39522f285 100644
--- a/spring-batch-samples/src/test/resources/job-runner-context.xml
+++ b/spring-batch-samples/src/test/resources/job-runner-context.xml
@@ -5,6 +5,6 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
-
+
diff --git a/spring-batch-samples/src/test/resources/org/springframework/batch/sample/JobStepFunctionalTests-context.xml b/spring-batch-samples/src/test/resources/org/springframework/batch/sample/JobStepFunctionalTests-context.xml
index fc6b10457..06488fac8 100644
--- a/spring-batch-samples/src/test/resources/org/springframework/batch/sample/JobStepFunctionalTests-context.xml
+++ b/spring-batch-samples/src/test/resources/org/springframework/batch/sample/JobStepFunctionalTests-context.xml
@@ -6,7 +6,7 @@
-
+
diff --git a/spring-batch-test/.springBeans b/spring-batch-test/.springBeans
index f818c21fd..caea10aa6 100644
--- a/spring-batch-test/.springBeans
+++ b/spring-batch-test/.springBeans
@@ -1,7 +1,7 @@
1
-
+
@@ -13,6 +13,7 @@
src/test/resources/jobs/sampleFlowJob.xml
src/test/resources/jobs/sampleSimpleJob.xml
src/test/resources/jobs/sample-steps.xml
+ src/test/resources/job-runner-context.xml
diff --git a/spring-batch-test/src/main/java/org/springframework/batch/test/AbstractJobTests.java b/spring-batch-test/src/main/java/org/springframework/batch/test/AbstractJobTests.java
index ed6e0f800..35b2d5a26 100644
--- a/spring-batch-test/src/main/java/org/springframework/batch/test/AbstractJobTests.java
+++ b/spring-batch-test/src/main/java/org/springframework/batch/test/AbstractJobTests.java
@@ -65,7 +65,7 @@ import org.springframework.context.ApplicationContextAware;
* @author Dan Garrette
* @since 2.0
*
- * @deprecated (from 2.1) use {@link JobRunnerTestUtils} instead
+ * @deprecated (from 2.1) use {@link JobLauncherTestUtils} instead
*/
public abstract class AbstractJobTests implements ApplicationContextAware {
diff --git a/spring-batch-test/src/main/java/org/springframework/batch/test/JobRunnerTestUtils.java b/spring-batch-test/src/main/java/org/springframework/batch/test/JobLauncherTestUtils.java
similarity index 96%
rename from spring-batch-test/src/main/java/org/springframework/batch/test/JobRunnerTestUtils.java
rename to spring-batch-test/src/main/java/org/springframework/batch/test/JobLauncherTestUtils.java
index 1635781ce..d5148904b 100644
--- a/spring-batch-test/src/main/java/org/springframework/batch/test/JobRunnerTestUtils.java
+++ b/spring-batch-test/src/main/java/org/springframework/batch/test/JobLauncherTestUtils.java
@@ -64,7 +64,7 @@ import org.springframework.context.ApplicationContext;
* @author Dave Syer
* @since 2.1
*/
-public class JobRunnerTestUtils {
+public class JobLauncherTestUtils {
/** Logger */
protected final Log logger = LogFactory.getLog(getClass());
diff --git a/spring-batch-test/src/test/java/org/springframework/batch/test/AbstractSampleJobTests.java b/spring-batch-test/src/test/java/org/springframework/batch/test/AbstractSampleJobTests.java
index 249b772d8..8d5055f10 100644
--- a/spring-batch-test/src/test/java/org/springframework/batch/test/AbstractSampleJobTests.java
+++ b/spring-batch-test/src/test/java/org/springframework/batch/test/AbstractSampleJobTests.java
@@ -27,7 +27,7 @@ public abstract class AbstractSampleJobTests {
private SimpleJdbcTemplate jdbcTemplate;
@Autowired
- private JobRunnerTestUtils jobRunnerUtils;
+ private JobLauncherTestUtils jobLauncherTestUtils;
@Autowired
@Qualifier("tasklet2")
@@ -51,25 +51,25 @@ public abstract class AbstractSampleJobTests {
@Test
public void testJob() throws Exception {
- assertEquals(BatchStatus.COMPLETED, jobRunnerUtils.launchJob().getStatus());
+ assertEquals(BatchStatus.COMPLETED, jobLauncherTestUtils.launchJob().getStatus());
this.verifyTasklet(1);
this.verifyTasklet(2);
}
@Test(expected = IllegalStateException.class)
public void testNonExistentStep() {
- jobRunnerUtils.launchStep("nonExistent");
+ jobLauncherTestUtils.launchStep("nonExistent");
}
@Test
public void testStep1Execution() {
- assertEquals(BatchStatus.COMPLETED, jobRunnerUtils.launchStep("step1").getStatus());
+ assertEquals(BatchStatus.COMPLETED, jobLauncherTestUtils.launchStep("step1").getStatus());
this.verifyTasklet(1);
}
@Test
public void testStep2Execution() {
- assertEquals(BatchStatus.COMPLETED, jobRunnerUtils.launchStep("step2").getStatus());
+ assertEquals(BatchStatus.COMPLETED, jobLauncherTestUtils.launchStep("step2").getStatus());
this.verifyTasklet(2);
}
@@ -77,7 +77,7 @@ public abstract class AbstractSampleJobTests {
public void testStepLaunchJobContextEntry() {
ExecutionContext jobContext = new ExecutionContext();
jobContext.put("key1", "value1");
- assertEquals(BatchStatus.COMPLETED, jobRunnerUtils.launchStep("step2", jobContext).getStatus());
+ assertEquals(BatchStatus.COMPLETED, jobLauncherTestUtils.launchStep("step2", jobContext).getStatus());
this.verifyTasklet(2);
assertTrue(tasklet2.jobContextEntryFound);
}
diff --git a/spring-batch-test/src/test/resources/job-runner-context.xml b/spring-batch-test/src/test/resources/job-runner-context.xml
index e058c2d45..39522f285 100644
--- a/spring-batch-test/src/test/resources/job-runner-context.xml
+++ b/spring-batch-test/src/test/resources/job-runner-context.xml
@@ -5,6 +5,6 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd">
-
+