Incomplete - task 84: Fix samples
Fix execution tests broken by default skip policy
This commit is contained in:
@@ -34,6 +34,7 @@ import org.springframework.batch.execution.repository.dao.MapJobDao;
|
||||
import org.springframework.batch.execution.repository.dao.MapStepDao;
|
||||
import org.springframework.batch.execution.step.AbstractStep;
|
||||
import org.springframework.batch.execution.step.ItemOrientedStep;
|
||||
import org.springframework.batch.execution.step.support.NeverSkipItemSkipPolicy;
|
||||
import org.springframework.batch.item.ItemReader;
|
||||
import org.springframework.batch.item.ItemWriter;
|
||||
import org.springframework.batch.item.reader.ListItemReader;
|
||||
@@ -175,6 +176,7 @@ public class SimpleJobTests extends TestCase {
|
||||
throw new RuntimeException("Foo");
|
||||
}
|
||||
});
|
||||
step.setItemSkipPolicy(new NeverSkipItemSkipPolicy());
|
||||
step.afterPropertiesSet();
|
||||
job.setSteps(Collections.singletonList(step));
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ import org.springframework.batch.execution.repository.dao.MapStepDao;
|
||||
import org.springframework.batch.execution.scope.StepScope;
|
||||
import org.springframework.batch.execution.scope.StepSynchronizationManager;
|
||||
import org.springframework.batch.execution.step.support.JobRepositorySupport;
|
||||
import org.springframework.batch.execution.step.support.NeverSkipItemSkipPolicy;
|
||||
import org.springframework.batch.execution.step.support.StepInterruptionPolicy;
|
||||
import org.springframework.batch.io.exception.BatchCriticalException;
|
||||
import org.springframework.batch.item.ExecutionContext;
|
||||
@@ -539,6 +540,7 @@ public class ItemOrientedStepTests extends TestCase {
|
||||
throw new ResetFailedException("Bar");
|
||||
}
|
||||
});
|
||||
itemOrientedStep.setItemSkipPolicy(new NeverSkipItemSkipPolicy());
|
||||
|
||||
Step step = new StepSupport("stepName");
|
||||
JobExecution jobExecutionContext = jobInstance.createJobExecution();
|
||||
|
||||
Reference in New Issue
Block a user