IN PROGRESS - BATCH-888: skip listeners should be called when chunk is about to commit

onSkipInWrite(..) moved after write
This commit is contained in:
robokaso
2008-10-27 10:10:04 +00:00
parent 85eb5ba17b
commit b5e04ef089
2 changed files with 23 additions and 16 deletions

View File

@@ -23,6 +23,7 @@ import static org.easymock.EasyMock.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -193,8 +194,8 @@ public class FaultTolerantChunkOrientedTaskletTests {
assertTrue(attributes.hasAttribute("SKIPPED_OUTPUTS_BUFFER_KEY"));
}
@SuppressWarnings("unchecked")
List<String> chunk = (List<String>) attributes.getAttribute("SKIPPED_OUTPUTS_BUFFER_KEY");
assertEquals(1, chunk.size());
Map<String, Exception> skips = (Map<String, Exception>) attributes.getAttribute("SKIPPED_OUTPUTS_BUFFER_KEY");
assertEquals(1, skips.size());
// The last recovery for this chunk...
tasklet.execute(contribution, attributes);