You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2015/04/24 15:13:25 UTC

svn commit: r1675830 - /tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderThreadLocalMemoryLeak.java

Author: markt
Date: Fri Apr 24 13:13:24 2015
New Revision: 1675830

URL: http://svn.apache.org/r1675830
Log:
Address TheadLocal leak test failures.

Modified:
    tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderThreadLocalMemoryLeak.java

Modified: tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderThreadLocalMemoryLeak.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderThreadLocalMemoryLeak.java?rev=1675830&r1=1675829&r2=1675830&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderThreadLocalMemoryLeak.java (original)
+++ tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderThreadLocalMemoryLeak.java Fri Apr 24 13:13:24 2015
@@ -26,6 +26,7 @@ import java.util.logging.LogRecord;
 import javax.servlet.http.HttpServletResponse;
 
 import org.junit.Assert;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import org.apache.catalina.Context;
@@ -36,6 +37,22 @@ import org.apache.catalina.startup.Tomca
 import org.apache.tomcat.util.buf.ByteChunk;
 import org.apache.tomcat.util.threads.ThreadPoolExecutor;
 
+/*
+ * These unit tests are ignored by default as they are not reliable. They have
+ * been failing regularly on Gump for some time and have recently started to
+ * fail regularly on markt's laptop.
+ *
+ * The problem is that the ThreadLocal Maps are affected by GC. If GC occurs at
+ * the wrong point, the leaking ThreadLocal will be cleaned up and the test will
+ * fail. It is not possible to force the test to pass without effectively
+ * changing the nature of the test so it no longer tests detection of leaks via
+ * ThreadLocals.
+ *
+ * The test has been left in place since it will work reasonably reliably on
+ * most systems (just not all and particularly some of the ASF's CI systems) and
+ * still may be useful if a bug is reported in this area in the future.
+ */
+@Ignore
 public class TestWebappClassLoaderThreadLocalMemoryLeak extends TomcatBaseTest {
 
     @Test



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org