RESOLVED - issue BATCH-449: skip synchronization between reader and writer

http://jira.springframework.org/browse/BATCH-449

SimpleItemHandler redesigned for inheritance and fixed ItemSkipPolicyItemHandler to call skip on the reader only if exception is thrown in reader
This commit is contained in:
robokaso
2008-03-13 10:19:26 +00:00
parent a4b8ab3afd
commit 591e507421
3 changed files with 70 additions and 46 deletions

View File

@@ -71,13 +71,13 @@ public class SkipLimitStepFactoryBeanTests extends TestCase {
assertTrue(writer.skipped.contains("4"));
// TODO when reader throws exception on "2", it results in writer skipping "1"
// String[] expectedOutput = { "1", "3", "5" };
//
// for (int i = 0; i < expectedOutput.length; i++) {
// assertTrue("Output should contain \"" + expectedOutput[i] + "\"", writer.written
// .contains(expectedOutput[i]));
// }
// assertTrue(writer.written.size() == expectedOutput.length);
String[] expectedOutput = { "1", "3", "5" };
for (int i = 0; i < expectedOutput.length; i++) {
assertTrue("Output should contain \"" + expectedOutput[i] + "\"", writer.written
.contains(expectedOutput[i]));
}
assertTrue(writer.written.size() == expectedOutput.length);
}
/**