diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/SkipSampleFunctionalTests.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/SkipSampleFunctionalTests.java index 5b3c9f934..bf8fb1a43 100644 --- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/SkipSampleFunctionalTests.java +++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/SkipSampleFunctionalTests.java @@ -13,6 +13,8 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.batch.core.BatchStatus; import org.springframework.batch.core.JobExecution; +import org.springframework.batch.core.JobParametersInvalidException; +import org.springframework.batch.core.UnexpectedJobExecutionException; import org.springframework.batch.core.explore.JobExplorer; import org.springframework.batch.core.launch.JobOperator; import org.springframework.batch.core.launch.JobParametersNotFoundException; @@ -231,5 +233,11 @@ public class SkipSampleFunctionalTests { catch (JobInstanceAlreadyCompleteException e) { throw new RuntimeException(e); } + catch (UnexpectedJobExecutionException e) { + throw new RuntimeException(e); + } + catch (JobParametersInvalidException e) { + throw new RuntimeException(e); + } } } diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/support/JobSupport.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/support/JobSupport.java index 73a959222..6815d4ceb 100644 --- a/spring-batch-samples/src/test/java/org/springframework/batch/sample/support/JobSupport.java +++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/support/JobSupport.java @@ -21,7 +21,9 @@ import java.util.List; import org.springframework.batch.core.Job; import org.springframework.batch.core.JobExecution; +import org.springframework.batch.core.JobParameters; import org.springframework.batch.core.JobParametersIncrementer; +import org.springframework.batch.core.JobParametersInvalidException; import org.springframework.batch.core.Step; import org.springframework.batch.core.UnexpectedJobExecutionException; import org.springframework.beans.factory.BeanNameAware; @@ -96,6 +98,10 @@ public class JobSupport implements BeanNameAware, Job { public String getName() { return name; } + + public void validate(JobParameters parameters) throws JobParametersInvalidException { + // no-op + } public void setSteps(List steps) { this.steps.clear();