*/
public void testCollectionReader() throws Exception {
System.out.println("-------------- testCollectionReader -------------");
// Instantiate Uima EE Client
BaseUIMAAsynchronousEngine_impl eeUimaEngine = new BaseUIMAAsynchronousEngine_impl();
deployService(eeUimaEngine, relativePath + "/Deploy_PersonTitleAnnotator.xml");
Map<String, Object> appCtx = buildContext(String.valueOf(broker.getMasterConnectorURI()),
"PersonTitleAnnotatorQueue");
// reduce the cas pool size and reply window
appCtx.remove(UimaAsynchronousEngine.CasPoolSize);
appCtx.put(UimaAsynchronousEngine.CasPoolSize, Integer.valueOf(2));
appCtx.remove(UimaAsynchronousEngine.ReplyWindow);
appCtx.put(UimaAsynchronousEngine.ReplyWindow, 1);
// set the collection reader
String filename = super
.getFilepathFromClassloader("descriptors/collection_reader/ExtendedTestFileSystemCollectionReader.xml");
if (filename == null) {
fail("Unable to find file:" + "descriptors/collection_reader/ExtendedTestFileSystemCollectionReader.xml"
+ "in classloader");
}
File collectionReaderDescriptor = new File(filename);
CollectionReaderDescription collectionReaderDescription = UIMAFramework.getXMLParser()
.parseCollectionReaderDescription(new XMLInputSource(collectionReaderDescriptor));
CollectionReader collectionReader = UIMAFramework
.produceCollectionReader(collectionReaderDescription);
eeUimaEngine.setCollectionReader(collectionReader);
initialize(eeUimaEngine, appCtx);
waitUntilInitialized();
runCrTest(eeUimaEngine, 7);
synchronized (this) {
wait(50);
}
eeUimaEngine.stop();
}