Allow time for the OS to do a context switch. Otherwise this fails 100% of the time...
authorbillbarker <billbarker@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 25 Apr 2010 01:24:33 +0000 (01:24 +0000)
committerbillbarker <billbarker@13f79535-47bb-0310-9956-ffa450edef68>
Sun, 25 Apr 2010 01:24:33 +0000 (01:24 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@937733 13f79535-47bb-0310-9956-ffa450edef68

test/org/apache/catalina/loader/TestWebappClassLoaderMemoryLeak.java

index 58179d9..fbb4429 100644 (file)
@@ -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 &&