|
[
Permlink
| « Hide
]
Jens Eickmeyer added a comment - 03/Dec/07 03:44 AM
The configured job just reads a file a puts everything into the database. A second step just prints out all the previously added items.
Just a unit test for the sample job
A slightly modified version of the TradeProcessor which just throws an exception on the 5th item a causes a rollback of the current chunk. It is expected that the second step prints out all items except the 5th one because this one should be skipped during the second processing of the chunk which previously failed.
I found (and fixed) a bug in ResourceLineReader which means that if the exception is in the first chunk the failed chunk is not replayed. Can you try your test with chunk size = 2 (less than the failure point) and see if it works as you expected (I'm not clear on what you think the problem is because your unit test didn't have any assertions, but I am clear on the bug).
P.S. I committed your test (with an assertion) in the usual place. I tried your fix and it seems to work as expected now. So it was just this special scenario when reading from a file a forcing an error in the first chunk, right?
|
|||||||||||||||||||||||||||||||||||||||||||||||||