From: billbarker Date: Sun, 25 Apr 2010 01:24:33 +0000 (+0000) Subject: Allow time for the OS to do a context switch. Otherwise this fails 100% of the time... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=f5b480dce06aae3c4e786d0ba55aae446ae35c63;p=tomcat7.0 Allow time for the OS to do a context switch. Otherwise this fails 100% of the time on my Windows 7 box git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@937733 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java b/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java index 58179d9ea..fbb4429cd 100644 --- a/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java +++ b/test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java @@ -50,6 +50,11 @@ public class TestWebappClassLoaderMemoryLeak extends TomcatBaseTest { ctx.stop(); // If the thread still exists, we have a thread/memory leak + try { + Thread.sleep(10); + } catch(InterruptedException ie) { + // ignore + } Thread[] threads = getThreads(); for (Thread thread : threads) { if (thread != null &&