Incomplete - task 84: Fix samples

Fix execution tests broken by default skip policy
This commit is contained in:
dsyer
2008-02-26 12:09:48 +00:00
parent 66c4e7091b
commit 2edf00947f
2 changed files with 4 additions and 0 deletions

View File

@@ -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));

View File

@@ -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();