You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by cw...@apache.org on 2009/08/20 21:26:42 UTC

svn commit: r806316 - /incubator/uima/uima-as/trunk/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/TestUimaASExtended.java

Author: cwiklik
Date: Thu Aug 20 19:26:42 2009
New Revision: 806316

URL: http://svn.apache.org/viewvc?rev=806316&view=rev
Log:
UIMA-1477 Added new test case: testClientCpcTimeout()

Modified:
    incubator/uima/uima-as/trunk/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/TestUimaASExtended.java

Modified: incubator/uima/uima-as/trunk/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/TestUimaASExtended.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/TestUimaASExtended.java?rev=806316&r1=806315&r2=806316&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/TestUimaASExtended.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/TestUimaASExtended.java Thu Aug 20 19:26:42 2009
@@ -87,6 +87,18 @@
 		System.out.println("-------------- testBrokerLifecycle -------------");
 		System.out.println("UIMA_HOME="+System.getenv("UIMA_HOME")+System.getProperty("file.separator")+"bin"+System.getProperty("file.separator")+"dd2spring.xsl");
 	}
+	
+  public void testClientCpcTimeout() throws Exception
+  {
+    System.out.println("-------------- testClientCpcTimeout -------------");
+    BaseUIMAAsynchronousEngine_impl eeUimaEngine = new BaseUIMAAsynchronousEngine_impl();
+    deployService(eeUimaEngine, relativePath+"/Deploy_NoOpAnnotatorWithCpCDelay.xml");
+    Map<String, Object> appCtx = buildContext( String.valueOf(broker.getMasterConnectorURI()), "NoOpAnnotatorQueue" );
+    // Set an explicit CPC timeout as exceptions thrown in the 2nd annotator's CPC don't reach the client.
+    appCtx.put(UimaAsynchronousEngine.CpcTimeout, 2000 );
+    runTest(appCtx,eeUimaEngine,String.valueOf(broker.getMasterConnectorURI()),"NoOpAnnotatorQueue", 1, CPC_LATCH); //PC_LATCH);
+  }
+
 	/**
 	 * Tests handling of multiple calls to initialize(). A subsequent call to
 	 * initialize should result in ResourceInitializationException.
@@ -148,7 +160,7 @@
 		//	Instantiate Uima EE Client
 		BaseUIMAAsynchronousEngine_impl eeUimaEngine = new BaseUIMAAsynchronousEngine_impl();
 		//	Deploy Uima EE Primitive Service 
-		deployService(eeUimaEngine, relativePath+"/Deploy_PersonTitleAnnotator.xml");
+  	deployService(eeUimaEngine, relativePath+"/Deploy_PersonTitleAnnotator.xml");
     runTest(null,eeUimaEngine,String.valueOf(broker.getMasterConnectorURI()),"PersonTitleAnnotatorQueue", 0, EXCEPTION_LATCH);
 	}