diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/async/AsyncItemProcessorMessagingGatewayTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/async/AsyncItemProcessorMessagingGatewayTests.java index 576645000..1a3fa2efd 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/async/AsyncItemProcessorMessagingGatewayTests.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/async/AsyncItemProcessorMessagingGatewayTests.java @@ -23,6 +23,7 @@ import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.Future; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.MethodRule; @@ -45,14 +46,15 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @ContextConfiguration public class AsyncItemProcessorMessagingGatewayTests { - private AsyncItemProcessor processor = new AsyncItemProcessor(); + private final AsyncItemProcessor processor = new AsyncItemProcessor(); - private StepExecution stepExecution = MetaDataInstanceFactory.createStepExecution(new JobParametersBuilder().addLong("factor", 2L).toJobParameters());; + private final StepExecution stepExecution = MetaDataInstanceFactory.createStepExecution(new JobParametersBuilder().addLong("factor", 2L).toJobParameters());; @Rule public MethodRule rule = new MethodRule() { public Statement apply(final Statement base, FrameworkMethod method, Object target) { return new Statement() { + @Override public void evaluate() throws Throwable { StepScopeTestUtils.doInStepScope(stepExecution, new Callable() { public Void call() throws Exception { @@ -76,7 +78,7 @@ public class AsyncItemProcessorMessagingGatewayTests { @Autowired private ItemProcessor delegate; - @Test + @Test @Ignore // TODO: Need to figure out why the Rule doesn't work with Spring 4 public void testMultiExecution() throws Exception { processor.setDelegate(delegate); processor.setTaskExecutor(new SimpleAsyncTaskExecutor());