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/11/11 19:19:21 UTC
svn commit: r835001 -
/incubator/uima/uima-as/trunk/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/utils/BaseTestSupport.java
Author: cwiklik
Date: Wed Nov 11 18:19:20 2009
New Revision: 835001
URL: http://svn.apache.org/viewvc?rev=835001&view=rev
Log:
UIMA-1437 modified spinShutdownThread() method to accept array of container ids and stop all of them
Modified:
incubator/uima/uima-as/trunk/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/utils/BaseTestSupport.java
Modified: incubator/uima/uima-as/trunk/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/utils/BaseTestSupport.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/utils/BaseTestSupport.java?rev=835001&r1=835000&r2=835001&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/utils/BaseTestSupport.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-activemq/src/test/java/org/apache/uima/ee/test/utils/BaseTestSupport.java Wed Nov 11 18:19:20 2009
@@ -963,14 +963,14 @@
}
protected void spinShutdownThread(final BaseUIMAAsynchronousEngine_impl uimaEEEngine, long when,
- final String aSpringContainerId, final int stop_level) throws Exception {
+ final String[] aSpringContainerIds, final int stop_level) throws Exception {
Date timeToRun = new Date(System.currentTimeMillis() + when);
final Timer timer = new Timer();
timer.schedule(new TimerTask() {
public void run() {
timer.cancel();
timer.purge();
- if (aSpringContainerId == null) {
+ if (aSpringContainerIds == null) {
isStopping = true;
System.out.println(">>>> runTest: Stopping UIMA EE Engine");
uimaEEEngine.stop();
@@ -987,7 +987,9 @@
} else {
try {
System.out.println(">>>> runTest: Quiescing Service And Stopping it");
- uimaEEEngine.undeploy(aSpringContainerId, stop_level);
+ for( int i = aSpringContainerIds.length; i > 0; i--) {
+ uimaEEEngine.undeploy(aSpringContainerIds[i-1], stop_level);
+ }
} catch (Exception e) {
e.printStackTrace();
}