diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/ParentStepFactoryBeanParserTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/ParentStepFactoryBeanParserTests.java index 333aa6395..2ec531b2e 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/ParentStepFactoryBeanParserTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/configuration/xml/ParentStepFactoryBeanParserTests.java @@ -42,4 +42,15 @@ public class ParentStepFactoryBeanParserTests { assertTrue("Wrong processor type", chunkProcessor instanceof FaultTolerantChunkProcessor); } + @Test + public void testSkippableAttributes() throws Exception { + ConfigurableApplicationContext context = new ClassPathXmlApplicationContext( + "org/springframework/batch/core/configuration/xml/ParentSkippableStepFactoryBeanParserTests-context.xml"); + Object step = context.getBean("s1", Step.class); + assertNotNull("Step not parsed", step); + Object tasklet = ReflectionTestUtils.getField(step, "tasklet"); + Object chunkProcessor = ReflectionTestUtils.getField(tasklet, "chunkProcessor"); + assertTrue("Wrong processor type", chunkProcessor instanceof FaultTolerantChunkProcessor); + } + } diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/ParentSkippableStepFactoryBeanParserTests-context.xml b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/ParentSkippableStepFactoryBeanParserTests-context.xml new file mode 100644 index 000000000..409433076 --- /dev/null +++ b/spring-batch-core/src/test/resources/org/springframework/batch/core/configuration/xml/ParentSkippableStepFactoryBeanParserTests-context.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file