Author: clebert.suconic(a)jboss.com
Date: 2010-12-01 14:11:00 -0500 (Wed, 01 Dec 2010)
New Revision: 9967
Modified:
trunk/tests/src/org/hornetq/tests/util/UnitTestCase.java
Log:
removing eager thread leakage verification. Making to fail only the test that created the
failure condition (not the whole testsuite)
Modified: trunk/tests/src/org/hornetq/tests/util/UnitTestCase.java
===================================================================
--- trunk/tests/src/org/hornetq/tests/util/UnitTestCase.java 2010-12-01 17:53:34 UTC (rev
9966)
+++ trunk/tests/src/org/hornetq/tests/util/UnitTestCase.java 2010-12-01 19:11:00 UTC (rev
9967)
@@ -35,6 +35,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import java.util.UUID;
import javax.naming.Context;
@@ -97,6 +98,10 @@
private static final String testDir = System.getProperty("java.io.tmpdir",
"/tmp") + "/hornetq-unit-test";
+
+ // There is a verification about thread leakages. We only fail a single thread when
this happens
+ private static Set<Thread> alreadyFailedThread = new HashSet<Thread>();
+
// Static --------------------------------------------------------
protected static String getUDPDiscoveryAddress()
@@ -782,8 +787,9 @@
StackTraceElement[] stack = threadMap.get(thread);
for (StackTraceElement stackTraceElement : stack)
{
- if
(stackTraceElement.getMethodName().contains("getConnectionWithRetry"))
+ if
(stackTraceElement.getMethodName().contains("getConnectionWithRetry") &&
!alreadyFailedThread.contains(thread))
{
+ alreadyFailedThread.add(thread);
System.out.println(threadDump(this.getName() + " has left threads
running. Look at thread " +
thread.getName() +
" id = " +
Show replies by date