BATCH-2204: Updated StepParserStepFactoryBean to set the buffered flag correctly when building a fault tolerant step

This commit is contained in:
Michael Minella
2014-04-10 17:17:57 -05:00
parent 9b925c2e84
commit 19618f48f9
2 changed files with 31 additions and 27 deletions

View File

@@ -16,12 +16,6 @@
package org.springframework.batch.core.configuration.xml;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.util.HashMap;
import java.util.Map;
import org.junit.Test;
import org.springframework.aop.framework.Advised;
import org.springframework.aop.framework.ProxyFactory;
@@ -50,6 +44,13 @@ import org.springframework.test.util.ReflectionTestUtils;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import java.util.HashMap;
import java.util.Map;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertFalse;
/**
* @author Dan Garrette
* @since 2.0
@@ -248,6 +249,7 @@ public class StepParserStepFactoryBeanTests {
assertEquals(new Integer(10), throttleLimit);
Object tasklet = ReflectionTestUtils.getField(step, "tasklet");
assertTrue(tasklet instanceof ChunkOrientedTasklet<?>);
assertFalse((Boolean) ReflectionTestUtils.getField(tasklet, "buffering"));
Object chunkProvider = ReflectionTestUtils.getField(tasklet, "chunkProvider");
Object repeatOperations = ReflectionTestUtils.getField(chunkProvider, "repeatOperations");
Object completionPolicy = ReflectionTestUtils.getField(repeatOperations, "completionPolicy");