Package com.ibm.jbatch.tck.tests.jslxml
Class ListenerOnErrorTests
- java.lang.Object
-
- com.ibm.jbatch.tck.tests.jslxml.ListenerOnErrorTests
-
public class ListenerOnErrorTests extends Object
-
-
Constructor Summary
Constructors Constructor Description ListenerOnErrorTests()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
setup()
void
testOnProcessErrorItems()
void
testOnWriteErrorItems()
-
-
-
Method Detail
-
testOnWriteErrorItems
@TCKTest(versions="1.1.WORKING",assertions="ItemWriteListener#onWriteError is passed the list of items that were being written by ItemWriter#writeItems when exception was thrown.",specRefs={@SpecRef(version="1.0",section="9.1.1.3",citations="@param items specifies the list of items to write. This may be an empty list (e.g. if all the items have been filtered out by the ItemProcessor).",notes="API for ItemWriter"),@SpecRef(version="1.0",section="9.2.6",citations="The onWriteError method receives control after an item writer writeItems throws an exception. The method receives the list of items sent to the item writer as input.",notes="API for ItemWriteListener")},apiRefs={@APIRef(className="jakarta.batch.api.chunk.ItemWriter",methodNames="writeItems"),@APIRef(className="jakarta.batch.api.chunk.listener.ItemWriteListener",methodNames="onWriteError")},issueRefs="https://java.net/bugzilla/show_bug.cgi?id=5431",strategy="Intentionally fail writer at a specific record number. Take the items passed as input parameter to onWriteError, and set a String representation of this List as the job\'s exit status. Check that this matches the expected value based on the chunk size, input data, and failing record number. Also check that the job fails.") public void testOnWriteErrorItems() throws Exception
- Throws:
Exception
-
testOnProcessErrorItems
@TCKTest(versions="1.1.WORKING",assertions="ItemProcessListener#onProcessError is passed the item that ItemProcessor#processItem throws an exception for.",specRefs={@SpecRef(version="1.0",section="9.1.1.2",citations="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.",notes="API for ItemProcessor"),@SpecRef(version="1.0",section="9.2.5",citations="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.",notes="API for ItemProcessListener")},apiRefs={@APIRef(className="jakarta.batch.api.chunk.ItemProcessor",methodNames="processItem"),@APIRef(className="jakarta.batch.api.chunk.listener.ItemProcessListener",methodNames="onProcessError")},issueRefs="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.") public void testOnProcessErrorItems() throws Exception
- Throws:
Exception
-
-