Skip to content
Permalink
Browse files
BATCH-2096: 'chunk-completion-policy' or 'commit-interval' with '#{jo…
…bParameters[...]}' is ignored when 'retry-limit' exists.

* Added a call for a completionPolicy  when creating FaultTolerantStep
* Added an assertion for the chunkCompletionPolicy in the unit test.

JIRA: https://jira.springsource.org/browse/BATCH-2096
  • Loading branch information
benelog authored and mminella committed Sep 8, 2013
1 parent 56ccca6 commit 69e047801a8fb3d929295b8a066c9a7965effd82
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
@@ -301,6 +301,7 @@ private Step createFaultTolerantStep() {
if (commitInterval != null) {
builder.chunk(commitInterval);
}
builder.chunk(chunkCompletionPolicy);
enhanceTaskletStepBuilder(builder);

builder.reader(itemReader);
@@ -248,6 +248,10 @@ public void testFaultTolerantStep() throws Exception {
assertEquals(new Integer(10), throttleLimit);
Object tasklet = ReflectionTestUtils.getField(step, "tasklet");
assertTrue(tasklet instanceof ChunkOrientedTasklet<?>);
Object chunkProvider = ReflectionTestUtils.getField(tasklet, "chunkProvider");
Object repeatOperations = ReflectionTestUtils.getField(chunkProvider, "repeatOperations");
Object completionPolicy = ReflectionTestUtils.getField(repeatOperations, "completionPolicy");
assertTrue(completionPolicy instanceof DummyCompletionPolicy);
}

@Test

0 comments on commit 69e0478

Please sign in to comment.