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/07/02 18:48:16 UTC

svn commit: r790670 - /incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/utils/BaseTestSupport.java

Author: cwiklik
Date: Thu Jul  2 16:48:15 2009
New Revision: 790670

URL: http://svn.apache.org/viewvc?rev=790670&view=rev
Log:
UIMA-1416 Refactored spinShutdownThread

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

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/utils/BaseTestSupport.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/utils/BaseTestSupport.java?rev=790670&r1=790669&r2=790670&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/utils/BaseTestSupport.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/utils/BaseTestSupport.java Thu Jul  2 16:48:15 2009
@@ -929,28 +929,29 @@
       {
         timer.cancel();
         timer.purge();
-        System.out.println(">>>> runTest: Stopping UIMA EE Engine");
-        isStopping = true;
         if ( aSpringContainerId == null ) {
+          isStopping = true;
+          System.out.println(">>>> runTest: Stopping UIMA EE Engine");
           uimaEEEngine.stop();
+          isStopping = false;
+          isStopped = true;
+          System.out.println(">>>> runTest: UIMA EE Engine Stopped");
+          if (cpcLatch != null )
+            cpcLatch.countDown();
+          if ( processCountLatch != null) {
+            while (processCountLatch.getCount() > 0) {
+              processCountLatch.countDown();
+            }
+          }
         } else {
           try {
+            System.out.println(">>>> runTest: Quiescing Service And Stopping it");
             uimaEEEngine.undeploy(aSpringContainerId, stop_level);
           } catch( Exception e) {
             e.printStackTrace();
           }
         }
         
-        isStopping = false;
-        isStopped = true;
-        System.out.println(">>>> runTest: UIMA EE Engine Stopped");
-        if (cpcLatch != null )
-          cpcLatch.countDown();
-        if ( processCountLatch != null) {
-          while (processCountLatch.getCount() > 0) {
-            processCountLatch.countDown();
-          }
-        }
       }
     }, timeToRun);