Updated the JsrStepExecutionSplitter to provide a copy of the JobExecution per partition
This commit is contained in:
@@ -39,6 +39,7 @@ import javax.batch.api.partition.PartitionPlanImpl;
|
||||
import javax.batch.runtime.BatchStatus;
|
||||
import javax.batch.runtime.JobExecution;
|
||||
import javax.batch.runtime.context.JobContext;
|
||||
import javax.batch.runtime.context.StepContext;
|
||||
import javax.inject.Inject;
|
||||
|
||||
import org.junit.Before;
|
||||
@@ -300,12 +301,21 @@ public class PartitionParserTests {
|
||||
@BatchProperty
|
||||
String artifactName;
|
||||
|
||||
@Inject
|
||||
StepContext stepContext;
|
||||
|
||||
@Inject
|
||||
JobContext jobContext;
|
||||
|
||||
@Override
|
||||
public String process() throws Exception {
|
||||
artifactNames.add(artifactName);
|
||||
threadNames.add(Thread.currentThread().getName());
|
||||
processed++;
|
||||
|
||||
stepContext.setExitStatus("bad step exit status");
|
||||
jobContext.setExitStatus("bad job exit status");
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ public class JobContextTests {
|
||||
|
||||
@Test(expected = IllegalStateException.class)
|
||||
public void testIllegalContextId() throws Exception {
|
||||
context = new JobContext(new JobExecution(null));
|
||||
context = new JobContext(new JobExecution((Long) null));
|
||||
context.getId();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user