RESOLVED - BATCH-548: skipping items can lead to an invalidated mark in the ResourceItemReader
added item buffering to FlatFileItemReader
This commit is contained in:
@@ -152,7 +152,7 @@ public class FlatFileItemReaderAdvancedTests extends TestCase {
|
||||
// get restart data
|
||||
reader.update(executionContext);
|
||||
assertEquals(4, executionContext.getLong(ClassUtils.getShortName(FlatFileItemReader.class)
|
||||
+ ".lines.read.count"));
|
||||
+ ".item.count"));
|
||||
// close input
|
||||
reader.close(executionContext);
|
||||
|
||||
@@ -167,7 +167,7 @@ public class FlatFileItemReaderAdvancedTests extends TestCase {
|
||||
|
||||
reader.update(executionContext);
|
||||
assertEquals(6, executionContext.getLong(ClassUtils.getShortName(FlatFileItemReader.class)
|
||||
+ ".lines.read.count"));
|
||||
+ ".item.count"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ public class FlatFileItemReaderBasicTests extends TestCase {
|
||||
try {
|
||||
itemReader.open(executionContext);
|
||||
fail("Expected IllegalArgumentException");
|
||||
} catch (IllegalArgumentException e) {
|
||||
} catch (ItemStreamException e) {
|
||||
// expected
|
||||
}
|
||||
}
|
||||
@@ -208,7 +208,8 @@ public class FlatFileItemReaderBasicTests extends TestCase {
|
||||
fail("Expected BatchEnvironmentException");
|
||||
} catch (ItemStreamException e) {
|
||||
// expected
|
||||
assertEquals("foo", e.getCause().getMessage());
|
||||
assertEquals("Failed to initialize the reader", e.getMessage());
|
||||
assertEquals("foo", e.getCause().getCause().getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -290,7 +291,7 @@ public class FlatFileItemReaderBasicTests extends TestCase {
|
||||
try {
|
||||
testReader.open(executionContext);
|
||||
fail();
|
||||
} catch (IllegalStateException ex) {
|
||||
} catch (ItemStreamException ex) {
|
||||
// expected
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user