Make the tesst easier to debug
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 8 Feb 2010 16:13:21 +0000 (16:13 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Mon, 8 Feb 2010 16:13:21 +0000 (16:13 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@907713 13f79535-47bb-0310-9956-ffa450edef68

test/org/apache/catalina/startup/TomcatBaseTest.java

index 0795f02..01ce0da 100644 (file)
@@ -25,6 +25,8 @@ import java.net.HttpURLConnection;
 import java.net.URL;
 import java.util.List;
 import java.util.Map;
+import java.util.logging.ConsoleHandler;
+import java.util.logging.LogManager;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
@@ -68,6 +70,13 @@ public abstract class TomcatBaseTest extends TestCase {
     
     @Override
     public void setUp() throws Exception {
+        // Need to use JULI and to configure a ConsoleHandler so log messages
+        // from the tests are visible
+        System.setProperty("java.util.logging.config.class",
+                "org.apache.juli.ClassLoaderLogManager");
+        LogManager.getLogManager().getLogger("").addHandler(
+            new ConsoleHandler());
+
         tempDir = new File("output/tmp");
         tempDir.mkdir();