Author: cwiklik
Date: Thu Sep 16 13:42:50 2010
New Revision: 997749

URL: http://svn.apache.org/viewvc?rev=997749&view=rev
Log:
UIMA-1872 Added testDeployPrimitiveServiceWithInitFailure()

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

Modified: 
uima/uima-as/trunk/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/TestUimaASExtended.java
URL: 
http://svn.apache.org/viewvc/uima/uima-as/trunk/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/TestUimaASExtended.java?rev=997749&r1=997748&r2=997749&view=diff
==============================================================================
--- 
uima/uima-as/trunk/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/TestUimaASExtended.java
 (original)
+++ 
uima/uima-as/trunk/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/TestUimaASExtended.java
 Thu Sep 16 13:42:50 2010
@@ -925,6 +925,20 @@ public class TestUimaASExtended extends 
     runTest(null, eeUimaEngine, String.valueOf(broker.getMasterConnectorURI()),
             "PersonTitleAnnotatorQueue", 0, EXCEPTION_LATCH);
   }
+  public void testDeployPrimitiveServiceWithInitFailure() throws Exception {
+           System.out.println("-------------- 
testDeployPrimitiveServiceWithInitFailure -------------");
+           // Instantiate Uima EE Client
+           BaseUIMAAsynchronousEngine_impl eeUimaEngine = new 
BaseUIMAAsynchronousEngine_impl();
+           // Deploy Uima EE Primitive Service
+           try {
+                   deployService(eeUimaEngine, relativePath + 
"/Deploy_NoOpAnnotatorWithInitException.xml");
+           } catch( ResourceInitializationException e) {
+               System.out.println("Received Expected 
ResourceInitializationException On Service Deploy");
+                   return;
+           }
+           fail("Expected ResourceInitializationException Not Thrown from 
deployed Service.");
+  }
+  
   public void testTypeSystemMerge() throws Exception {
     System.out.println("-------------- testTypeSystemMerge -------------");
     // Instantiate Uima EE Client
@@ -1282,7 +1296,7 @@ public class TestUimaASExtended extends 
           // at this point the top level service should show a connection error
           synchronized (this) {
             // wait for 3 seconds before stopping
-            this.wait(3000);
+            this.wait(5000);
           }
           eeUimaEngine.stopProducingCases();
         } catch (Exception e) {
@@ -1602,7 +1616,7 @@ public class TestUimaASExtended extends 
     deployService(eeUimaEngine, relativePath
             + "/Deploy_AggregateWithFlowControllerExceptionOnDisable.xml");
     runTest(null, eeUimaEngine, 
String.valueOf(broker.getMasterConnectorURI()), "TopLevelTaeQueue",
-            1, EXCEPTION_LATCH); // PC_LATCH);
+            1, PROCESS_LATCH); // PC_LATCH);
   }
 
   /**
@@ -2100,7 +2114,7 @@ public class TestUimaASExtended extends 
   }
 
   public void testExistanceOfParentCasReferenceIdOnChildFailure() throws 
Exception {
-    System.out
+         System.out
             .println("-------------- 
testExistanceOfParentCasReferenceIdOnChildFailure -------------");
     BaseUIMAAsynchronousEngine_impl eeUimaEngine = new 
BaseUIMAAsynchronousEngine_impl();
     deployService(eeUimaEngine, relativePath + 
"/Deploy_NoOpAnnotatorWithException.xml");


Reply via email to