RESOLVED - BATCH-571: Remove reference to Step from StepExecution and reference to Job from JobInstance
JobInstance's reference to Job replaced with jobName string
This commit is contained in:
@@ -6,7 +6,6 @@ import org.springframework.batch.core.JobParameters;
|
||||
import org.springframework.batch.core.StepExecution;
|
||||
import org.springframework.batch.item.ExecutionContext;
|
||||
import org.springframework.batch.sample.item.writer.StagingItemWriter;
|
||||
import org.springframework.batch.sample.tasklet.JobSupport;
|
||||
import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
@@ -37,7 +36,7 @@ public class StagingItemReaderTests extends AbstractTransactionalDataSourceSprin
|
||||
*/
|
||||
protected void onSetUpBeforeTransaction() throws Exception {
|
||||
StepExecution stepExecution = new StepExecution("stepName", new JobExecution(new JobInstance(jobId,
|
||||
new JobParameters(), new JobSupport("testJob"))));
|
||||
new JobParameters(), "testJob")));
|
||||
reader.beforeStep(stepExecution);
|
||||
writer.beforeStep(stepExecution);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ import org.springframework.batch.core.JobExecution;
|
||||
import org.springframework.batch.core.JobInstance;
|
||||
import org.springframework.batch.core.JobParameters;
|
||||
import org.springframework.batch.core.StepExecution;
|
||||
import org.springframework.batch.sample.tasklet.JobSupport;
|
||||
import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests;
|
||||
import org.springframework.util.ClassUtils;
|
||||
|
||||
@@ -42,7 +41,7 @@ public class StagingItemWriterTests extends AbstractTransactionalDataSourceSprin
|
||||
*/
|
||||
protected void onSetUpBeforeTransaction() throws Exception {
|
||||
StepExecution stepExecution = new StepExecution("stepName", new JobExecution(new JobInstance(new Long(12L),
|
||||
new JobParameters(), new JobSupport("testJob"))));
|
||||
new JobParameters(), "testJob")));
|
||||
writer.beforeStep(stepExecution);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user