Package: | com.ibm.jbatch.tck.tests.jslxml |
Class: | ListenerOnErrorTests |
Test introduced in TCK Version: 1.1.WORKING
Assertion(s) |
---|
ItemProcessListener#onProcessError is passed the item that ItemProcessor#processItem throws an exception for. |
Section | Version | Citation(s) | Note(s) |
---|---|---|---|
9.1.1.2 | 1.0 | ~ The processItem method is part of a chunk step. It accepts an input item from an item reader and returns an item that gets passed onto the item writer. | ~ API for ItemProcessor |
9.2.5 | 1.0 | ~ The onProcessError method receives control after an item processor processItem throws an exception. The method receives the item sent to the item processor as input. | ~ API for ItemProcessListener |
Class Name | Method Names | Note(s) |
---|---|---|
jakarta.batch.api.chunk.ItemProcessor | ~ processItem | |
jakarta.batch.api.chunk.listener.ItemProcessListener | ~ onProcessError |
Link(s) |
---|
https://java.net/bugzilla/show_bug.cgi?id=5431 |
Strategy |
---|
Intentionally fail processor at a specific record number. Take the item passed as input parameter to onProcessError, and set a String representation of this item as the job's exit status. Check that this matches the expected value based on the input data and the failing record number. Also check that the job fails. |
Comment(s) |
---|