activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1381991 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/vm/VmTransportNetworkBrokerTest.java
Date Fri, 07 Sep 2012 12:14:36 GMT
Author: davsclaus
Date: Fri Sep  7 12:14:35 2012
New Revision: 1381991

URL: http://svn.apache.org/viewvc?rev=1381991&view=rev
Log:
AMQ-3451: Ensure thread pools is shutdown properly to avoid any leaks. Do not use the old
@deprecated thread pool.

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/vm/VmTransportNetworkBrokerTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/vm/VmTransportNetworkBrokerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/vm/VmTransportNetworkBrokerTest.java?rev=1381991&r1=1381990&r2=1381991&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/vm/VmTransportNetworkBrokerTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/vm/VmTransportNetworkBrokerTest.java
Fri Sep  7 12:14:35 2012
@@ -30,7 +30,6 @@ import org.apache.activemq.ActiveMQConne
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.bugs.embedded.ThreadExplorer;
 import org.apache.activemq.network.NetworkConnector;
-import org.apache.activemq.thread.DefaultThreadPools;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -93,21 +92,17 @@ public class VmTransportNetworkBrokerTes
         broker.stop();
         broker.waitUntilStopped();
 
-        // must only be called when all brokers and connections are done!
-        DefaultThreadPools.shutdown();
-
         // let it settle
         TimeUnit.SECONDS.sleep(5);        
 
         // get final threads but filter out any daemon threads that the JVM may have created.
         Thread[] threads = filterDaemonThreads(ThreadExplorer.listThreads());
         int threadCountAfterStop = threads.length;
-        
-        if (LOG.isDebugEnabled()) {
-        	LOG.debug(ThreadExplorer.show("active after stop"));
-        	LOG.debug("originalThreadCount=" + originalThreadCount + " threadCountAfterStop="
+ threadCountAfterStop); 
-        }
-        
+
+        // lets see the thread counts at INFO level so they are always in the test log
+        LOG.info(ThreadExplorer.show("active after stop"));
+        LOG.info("originalThreadCount=" + originalThreadCount + " threadCountAfterStop="
+ threadCountAfterStop);
+
         assertTrue("Threads are leaking: " + 
         		ThreadExplorer.show("active after stop") + 
         		". originalThreadCount=" + 



Mime
View raw message