tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r950504 - /tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java
Date Wed, 02 Jun 2010 11:40:55 GMT
Author: markt
Date: Wed Jun  2 11:40:55 2010
New Revision: 950504

URL: http://svn.apache.org/viewvc?rev=950504&view=rev
Log:
Fix test failure. Need to explicitly configure stopping timer threads

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

Modified: tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java?rev=950504&r1=950503&r2=950504&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java (original)
+++ tomcat/trunk/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java Wed
Jun  2 11:40:55 2010
@@ -26,6 +26,7 @@ import javax.servlet.http.HttpServletReq
 import javax.servlet.http.HttpServletResponse;
 
 import org.apache.catalina.Context;
+import org.apache.catalina.core.StandardContext;
 import org.apache.catalina.startup.Tomcat;
 import org.apache.catalina.startup.TomcatBaseTest;
 
@@ -37,6 +38,10 @@ public class TestWebappClassLoaderMemory
         // Must have a real docBase - just use temp
         Context ctx = 
             tomcat.addContext("/", System.getProperty("java.io.tmpdir"));
+
+        if (ctx instanceof StandardContext) {
+            ((StandardContext) ctx).setClearReferencesStopTimerThreads(true);
+        }
         
         Tomcat.addServlet(ctx, "taskServlet", new TaskServlet());
         ctx.addServletMapping("/", "taskServlet");



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


Mime
View raw message