harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r443298 - in /incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging: ./ util/
Date Thu, 14 Sep 2006 09:30:15 GMT
Author: pyang
Date: Thu Sep 14 02:30:13 2006
New Revision: 443298

URL: http://svn.apache.org/viewvc?view=rev&rev=443298
Log:
Refactor logging tests so that default jre/lib/logging.properties won't be updated any more,
some test cases depending on default logging properties are disabled temporirally, I will
enabled them based on Support_Exec later.

Removed:
    incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/util/DefaultPropertyHelper.java
Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FileHandlerTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/MemoryHandlerTest.java
    incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SocketHandlerTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FileHandlerTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FileHandlerTest.java?view=diff&rev=443298&r1=443297&r2=443298
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FileHandlerTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/FileHandlerTest.java
Thu Sep 14 02:30:13 2006
@@ -39,14 +39,14 @@
 import java.util.logging.XMLFormatter;
 
 import junit.framework.TestCase;
-import org.apache.harmony.logging.tests.java.util.logging.util.DefaultPropertyHelper;
+
 import org.apache.harmony.logging.tests.java.util.logging.util.EnvironmentHelper;
 
 /**
  */
 public class FileHandlerTest extends TestCase {
 
-	static LogManager manager;
+	static LogManager manager=LogManager.getLogManager();
 
 	final static Properties props = new Properties();
 
@@ -62,20 +62,6 @@
 
 	final static String SEP = File.separator;
 
-	private static File bakPropFile = null;
-
-	static {
-		try {
-			bakPropFile = DefaultPropertyHelper.init();
-		} catch (Exception e) {
-		}
-		Runtime.getRuntime().addShutdownHook(new Thread() {
-			public void run() {
-				DefaultPropertyHelper.reset(bakPropFile);
-			}
-		});
-	}
-
 	FileHandler handler;
 
 	LogRecord r;
@@ -85,7 +71,6 @@
 	 */
 	protected void setUp() throws Exception {
 		super.setUp();
-		manager = LogManager.getLogManager();
 		manager.reset();
 		initProps();
 		File file = new File(TEMPPATH + SEP + "log");

Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java?view=diff&rev=443298&r1=443297&r2=443298
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/LogManagerTest.java
Thu Sep 14 02:30:13 2006
@@ -17,7 +17,6 @@
 
 import java.beans.PropertyChangeEvent;
 import java.beans.PropertyChangeListener;
-import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.security.Permission;
@@ -32,7 +31,7 @@
 import java.util.logging.LoggingPermission;
 
 import junit.framework.TestCase;
-import org.apache.harmony.logging.tests.java.util.logging.util.DefaultPropertyHelper;
+
 import org.apache.harmony.logging.tests.java.util.logging.util.EnvironmentHelper;
 
 /**
@@ -62,40 +61,14 @@
 
 	static final SecurityManager securityManager = System.getSecurityManager();
 
-	static final String classpath = System.getProperty("java.class.path");
-
-	// FIXME awaiting a completed regex package implementation
-	// static final String configFilePath =
-	// LogManagerTest.class.getClassLoader()
-	// .getResource("logging.config").getPath().replaceAll("%20", " ");
-
-	// should be replaced by the one upper
-	static final String configFilePath = LogManagerTest.class.getClassLoader()
-			.getResource("config/java/util/logging/logging.config")
-			.getPath();
-
 	static final String clearPath = System.getProperty("clearpath");
 
-	private static File bakPropFile = null;
-
-	static {
-		try {
-			bakPropFile = DefaultPropertyHelper.init();
-		} catch (Exception e) {
-		}
-		Runtime.getRuntime().addShutdownHook(new Thread() {
-			public void run() {
-				DefaultPropertyHelper.reset(bakPropFile);
-			}
-		});
-	}
 
 	/*
 	 * @see TestCase#setUp()
 	 */
 	protected void setUp() throws Exception {
 		super.setUp();
-		System.setSecurityManager(securityManager);
 		mockManager = new MockLogManager();
 		listener = new MockPropertyChangeListener();
 		handler = new MockHandler();
@@ -220,10 +193,6 @@
 		assertSame(otherChild, grandson.getParent());
 	}
 
-	public void testAddGetLogger_nameWithDot() {
-		// TODO
-	}
-
 	public void testAddLoggerReverseOrder() {
 		Logger root = new MockLogger("testAddLoggerReverseOrder", null);
 		Logger foo = new MockLogger("testAddLoggerReverseOrder.foo", null);
@@ -376,33 +345,6 @@
 
 	}
 
-	// public void testOtherPermission() throws Exception {
-	// System.setSecurityManager(new MockSecurityManagerOtherPermission());
-	//
-	// mockManager.addLogger(new MockLogger("abc", null));
-	// // mockManager.addPropertyChangeListener(new
-	// MockPropertyChangeListener());
-	// mockManager.checkAccess();
-	// mockManager.getLogger("");
-	// mockManager.getLoggerNames();
-	// mockManager.getProperty(".level");
-	// try {
-	// mockManager.readConfiguration();
-	// fail("should throw securityException");
-	// } catch (SecurityException e) {
-	// }
-	// mockManager.readConfiguration(new ByteArrayInputStream(new byte[0]));
-	// mockManager.removePropertyChangeListener(null);
-	// mockManager.reset();
-	// LogManager.getLogManager();
-	// try {
-	// mockManager = new MockLogManager();
-	// fail("should throw securityException");
-	// } catch (SecurityException e) {
-	// }
-	// System.setSecurityManager(securityManager);
-	// }
-
 	public void testLoggingPermission() throws IOException {
 		System.setSecurityManager(new MockSecurityManagerLogPermission());
 		mockManager.addLogger(new MockLogger("abc", null));
@@ -464,8 +406,8 @@
 		checkPropertyNull(mockManager);
 		assertEquals(0, root.getHandlers().length);
 		assertEquals(null, root.getLevel());
-		mockManager.readConfiguration();
-		assertEquals(Level.INFO, root.getLevel());
+		mockManager.readConfiguration(EnvironmentHelper.PropertiesToInputStream(props));
+		assertEquals(Level.FINE, root.getLevel());
 		checkProperty(mockManager);
 		mockManager.reset();
 		checkPropertyNull(mockManager);
@@ -476,14 +418,15 @@
 	public void testGetProperty() throws SecurityException, IOException {
 		// but non-mock manager DO read it from the very beginning
 		Logger root = manager.getLogger("");
-		checkProperty(manager);
+        //FIXME: move it to exec
+//		checkProperty(manager);
 		assertEquals(Level.INFO, root.getLevel());
 		assertEquals(1, root.getHandlers().length);
 
-		manager.readConfiguration();
+		manager.readConfiguration(EnvironmentHelper.PropertiesToInputStream(props));
 		checkProperty(manager);
-		assertEquals(1, root.getHandlers().length);
-		assertEquals(Level.INFO, root.getLevel());
+		assertEquals(2, root.getHandlers().length);
+		assertEquals(Level.FINE, root.getLevel());
 
 		manager.reset();
 		checkPropertyNull(manager);
@@ -523,48 +466,42 @@
 				"java.util.logging.SimpleFormatter");
 		// assertEquals(m.getProperty("handlers"),
 		// "java.util.logging.ConsoleHandler");
-		assertEquals(m.getProperty("java.util.logging.FileHandler.count"), "1");
-		assertEquals(m.getProperty("com.xyz.foo.level"), "SEVERE");
+		assertEquals(m.getProperty("java.util.logging.FileHandler.count"), "5");
+		assertEquals(m.getProperty("foo.level"), "WARNING");
 		assertEquals(m.getProperty("java.util.logging.FileHandler.formatter"),
 				"java.util.logging.XMLFormatter");
 		assertEquals(m.getProperty("java.util.logging.ConsoleHandler.level"),
-				"INFO");
+				"OFF");
 		assertEquals(m.getProperty("java.util.logging.FileHandler.pattern"),
 				"%h/java%u.log");
 	}
 
-	public void testReadConfiguration() throws SecurityException, IOException {
-		File bakFile = DefaultPropertyHelper.init(props);
-
-		try {
-			Logger foo = new MockLogger("foo", null);
-			assertEquals(null, foo.getLevel());
-			assertTrue(mockManager.addLogger(foo));
-
-			Logger fo = new MockLogger("foo2", null);
-			fo.setLevel(Level.ALL);
-			assertTrue(mockManager.addLogger(fo));
-
-			Handler h = new ConsoleHandler();
-			Level l = h.getLevel();
-			assertNotSame(Level.OFF, h.getLevel());
-
-			// read configuration
-			mockManager.readConfiguration();
-			// level DO has effect
-			assertEquals(Level.WARNING, foo.getLevel());
-			// for non specifed logger, level is reset to null
-			assertEquals(null, fo.getLevel());
-
-			// read properties don't affect handler
-			assertNotSame(Level.OFF, h.getLevel());
-			assertSame(l, h.getLevel());
-
-		} finally {
-			DefaultPropertyHelper.reset(bakFile);
-		}
-
-	}
+//	public void testReadConfiguration() throws SecurityException, IOException {
+//          FIXME: move the support_exec
+//			Logger foo = new MockLogger("foo", null);
+//			assertEquals(null, foo.getLevel());
+//			assertTrue(mockManager.addLogger(foo));
+//
+//			Logger fo = new MockLogger("foo2", null);
+//			fo.setLevel(Level.ALL);
+//			assertTrue(mockManager.addLogger(fo));
+//
+//			Handler h = new ConsoleHandler();
+//			Level l = h.getLevel();
+//			assertNotSame(Level.OFF, h.getLevel());
+//
+//			// read configuration
+//			mockManager.readConfiguration();
+//			// level DO has effect
+//			assertEquals(Level.WARNING, foo.getLevel());
+//			// for non specifed logger, level is reset to null
+//			assertEquals(null, fo.getLevel());
+//
+//			// read properties don't affect handler
+//			assertNotSame(Level.OFF, h.getLevel());
+//			assertSame(l, h.getLevel());
+//
+//	}
 
 	/*
 	 * Class under test for void readConfiguration(InputStream)

Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/MemoryHandlerTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/MemoryHandlerTest.java?view=diff&rev=443298&r1=443297&r2=443298
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/MemoryHandlerTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/MemoryHandlerTest.java
Thu Sep 14 02:30:13 2006
@@ -31,7 +31,7 @@
 import java.util.logging.SimpleFormatter;
 
 import junit.framework.TestCase;
-import org.apache.harmony.logging.tests.java.util.logging.util.DefaultPropertyHelper;
+
 import org.apache.harmony.logging.tests.java.util.logging.util.EnvironmentHelper;
 
 /**
@@ -54,18 +54,6 @@
 	Handler target = new MockHandler();
 
 	private static File bak = null;
-
-	static {
-		try {
-			bak = DefaultPropertyHelper.init();
-		} catch (Exception e) {
-		}
-		Runtime.getRuntime().addShutdownHook(new Thread() {
-			public void run() {
-				DefaultPropertyHelper.reset(bak);
-			}
-		});
-	}
 
 	/*
 	 * @see TestCase#setUp()

Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SocketHandlerTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SocketHandlerTest.java?view=diff&rev=443298&r1=443297&r2=443298
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SocketHandlerTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SocketHandlerTest.java
Thu Sep 14 02:30:13 2006
@@ -16,7 +16,6 @@
 package org.apache.harmony.logging.tests.java.util.logging;
 
 import java.io.ByteArrayOutputStream;
-import java.io.File;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.OutputStream;
@@ -36,8 +35,9 @@
 import java.util.logging.XMLFormatter;
 
 import junit.framework.TestCase;
-import org.apache.harmony.logging.tests.java.util.logging.util.DefaultPropertyHelper;
+
 import org.apache.harmony.logging.tests.java.util.logging.util.EnvironmentHelper;
+
 import tests.util.CallVerificationStack;
 
 /**
@@ -45,25 +45,15 @@
  */
 public class SocketHandlerTest extends TestCase {
 
-	private final static String INVALID_LEVEL = "impossible_level";
+	private static final LogManager LOG_MANAGER = LogManager.getLogManager();
 
-	private static String className = SocketHandlerTest.class.getName();
+    private final static String INVALID_LEVEL = "impossible_level";
 
-	private static File bakPropFile;
+	private static String className = SocketHandlerTest.class.getName();
 
 	private SocketHandler h = null;
 
-	static {
-		try {
-			bakPropFile = DefaultPropertyHelper.init();
-		} catch (Exception e) {
-		}
-		Runtime.getRuntime().addShutdownHook(new Thread() {
-			public void run() {
-				DefaultPropertyHelper.reset(bakPropFile);
-			}
-		});
-	}
+    private Properties props;
 
 	/*
 	 * @see TestCase#setUp()
@@ -77,29 +67,51 @@
 	 */
 	protected void tearDown() throws Exception {
 		super.tearDown();
-		LogManager.getLogManager().reset();
+        initProps();
+		LOG_MANAGER.reset();
+        LOG_MANAGER.readConfiguration(EnvironmentHelper
+                .PropertiesToInputStream(props));
 		CallVerificationStack.getInstance().clear();
 		if (null != h) {
 			h.close();
 			h = null;
 		}
 	}
+    
+
+    private void initProps() throws Exception {
+        props = new Properties();
+        props.put("handlers", className + "$MockHandler " + className
+                + "$MockHandler");
+        props.put("java.util.logging.FileHandler.pattern", "%h/java%u.log");
+        props.put("java.util.logging.FileHandler.limit", "50000");
+        props.put("java.util.logging.FileHandler.count", "5");
+        props.put("java.util.logging.FileHandler.formatter",
+                "java.util.logging.XMLFormatter");
+        props.put(".level", "FINE");
+        props.put("java.util.logging.ConsoleHandler.level", "OFF");
+        props.put("java.util.logging.ConsoleHandler.formatter",
+                "java.util.logging.SimpleFormatter");
+        props.put("foo.handlers", "java.util.logging.ConsoleHandler");
+        props.put("foo.level", "WARNING");
+        props.put("com.xyz.foo.level", "SEVERE");
+    }
 
 	/*
 	 * Test the constructor with no relevant log manager properties are set.
 	 */
 	public void testConstructor_NoProperties() throws Exception {
-		assertNull(LogManager.getLogManager().getProperty(
+		assertNull(LOG_MANAGER.getProperty(
 				"java.util.logging.SocketHandler.level"));
-		assertNull(LogManager.getLogManager().getProperty(
+		assertNull(LOG_MANAGER.getProperty(
 				"java.util.logging.SocketHandler.filter"));
-		assertNull(LogManager.getLogManager().getProperty(
+		assertNull(LOG_MANAGER.getProperty(
 				"java.util.logging.SocketHandler.formatter"));
-		assertNull(LogManager.getLogManager().getProperty(
+		assertNull(LOG_MANAGER.getProperty(
 				"java.util.logging.SocketHandler.encoding"));
-		assertNull(LogManager.getLogManager().getProperty(
+		assertNull(LOG_MANAGER.getProperty(
 				"java.util.logging.SocketHandler.host"));
-		assertNull(LogManager.getLogManager().getProperty(
+		assertNull(LOG_MANAGER.getProperty(
 				"java.util.logging.SocketHandler.port"));
 
 		try {
@@ -164,18 +176,18 @@
 	 * except host and port.
 	 */
 	public void testConstructor_NoBasicProperties() throws Exception {
-		assertNull(LogManager.getLogManager().getProperty(
+		assertNull(LOG_MANAGER.getProperty(
 				"java.util.logging.SocketHandler.level"));
-		assertNull(LogManager.getLogManager().getProperty(
+		assertNull(LOG_MANAGER.getProperty(
 				"java.util.logging.SocketHandler.filter"));
-		assertNull(LogManager.getLogManager().getProperty(
+		assertNull(LOG_MANAGER.getProperty(
 				"java.util.logging.SocketHandler.formatter"));
-		assertNull(LogManager.getLogManager().getProperty(
+		assertNull(LOG_MANAGER.getProperty(
 				"java.util.logging.SocketHandler.encoding"));
 		Properties p = new Properties();
 		p.put("java.util.logging.SocketHandler.host", "127.0.0.1");
 		p.put("java.util.logging.SocketHandler.port", "6666");
-		LogManager.getLogManager().readConfiguration(
+		LOG_MANAGER.readConfiguration(
 				EnvironmentHelper.PropertiesToInputStream(p));
 
 		// start the server to be ready to accept log messages
@@ -213,7 +225,7 @@
 		p.put("java.util.logging.SocketHandler.encoding", "utf-8");
 		p.put("java.util.logging.SocketHandler.host", "127.0.0.1");
 		p.put("java.util.logging.SocketHandler.port", "6666");
-		LogManager.getLogManager().readConfiguration(
+		LOG_MANAGER.readConfiguration(
 				EnvironmentHelper.PropertiesToInputStream(p));
 
 		oldMan = System.getSecurityManager();
@@ -248,7 +260,7 @@
 		p.put("java.util.logging.SocketHandler.encoding", "iso-8859-1");
 		p.put("java.util.logging.SocketHandler.host", "127.0.0.1");
 		p.put("java.util.logging.SocketHandler.port", "6666");
-		LogManager.getLogManager().readConfiguration(
+		LOG_MANAGER.readConfiguration(
 				EnvironmentHelper.PropertiesToInputStream(p));
 
 		// start the server to be ready to accept log messages
@@ -292,7 +304,7 @@
 		p.put("java.util.logging.SocketHandler.encoding", "XXXX");
 		p.put("java.util.logging.SocketHandler.host", "127.0.0.1");
 		p.put("java.util.logging.SocketHandler.port", "6666");
-		LogManager.getLogManager().readConfiguration(
+		LOG_MANAGER.readConfiguration(
 				EnvironmentHelper.PropertiesToInputStream(p));
 
 		// start the server to be ready to accept log messages
@@ -342,7 +354,7 @@
 		p.put("java.util.logging.SocketHandler.encoding", "iso-8859-1");
 		p.put("java.util.logging.SocketHandler.host", "127.0.0.1");
 		p.put("java.util.logging.SocketHandler.port", "6666i");
-		LogManager.getLogManager().readConfiguration(
+		LOG_MANAGER.readConfiguration(
 				EnvironmentHelper.PropertiesToInputStream(p));
 
 		try {
@@ -367,7 +379,7 @@
 		p.put("java.util.logging.SocketHandler.encoding", "iso-8859-1");
 		p.put("java.util.logging.SocketHandler.host", "127.0.0.1");
 		p.put("java.util.logging.SocketHandler.port", "6665");
-		LogManager.getLogManager().readConfiguration(
+		LOG_MANAGER.readConfiguration(
 				EnvironmentHelper.PropertiesToInputStream(p));
 
 		try {
@@ -399,7 +411,7 @@
 		p.put("java.util.logging.SocketHandler.encoding", "iso-8859-1");
 		p.put("java.util.logging.SocketHandler.host", " 34345 #$#%$%$");
 		p.put("java.util.logging.SocketHandler.port", "6666");
-		LogManager.getLogManager().readConfiguration(
+		LOG_MANAGER.readConfiguration(
 				EnvironmentHelper.PropertiesToInputStream(p));
 
 		try {
@@ -427,7 +439,7 @@
 				+ "$MockFormatter");
 		p.put("java.util.logging.SocketHandler.host", "127.0.0.1");
 		p.put("java.util.logging.SocketHandler.port", "6666");
-		LogManager.getLogManager().readConfiguration(
+		LOG_MANAGER.readConfiguration(
 				EnvironmentHelper.PropertiesToInputStream(p));
 
 		// start the server to be ready to accept log messages
@@ -455,7 +467,7 @@
 				+ "$MockFormatter");
 		p.put("java.util.logging.SocketHandler.host", "127.0.0.1");
 		p.put("java.util.logging.SocketHandler.port", "6666");
-		LogManager.getLogManager().readConfiguration(
+		LOG_MANAGER.readConfiguration(
 				EnvironmentHelper.PropertiesToInputStream(p));
 
 		// start the server to be ready to accept log messages
@@ -480,7 +492,7 @@
 				+ "$MockFormatter");
 		p.put("java.util.logging.SocketHandler.host", "127.0.0.1");
 		p.put("java.util.logging.SocketHandler.port", "6666");
-		LogManager.getLogManager().readConfiguration(
+		LOG_MANAGER.readConfiguration(
 				EnvironmentHelper.PropertiesToInputStream(p));
 
 		// start the server to be ready to accept log messages
@@ -514,7 +526,7 @@
 				+ "$MockFormatter");
 		p.put("java.util.logging.SocketHandler.host", "127.0.0.1");
 		p.put("java.util.logging.SocketHandler.port", "6666");
-		LogManager.getLogManager().readConfiguration(
+		LOG_MANAGER.readConfiguration(
 				EnvironmentHelper.PropertiesToInputStream(p));
 
 		// start the server to be ready to accept log messages
@@ -553,7 +565,7 @@
 				+ "$MockFormatter");
 		p.put("java.util.logging.SocketHandler.host", "127.0.0.1");
 		p.put("java.util.logging.SocketHandler.port", "6666");
-		LogManager.getLogManager().readConfiguration(
+		LOG_MANAGER.readConfiguration(
 				EnvironmentHelper.PropertiesToInputStream(p));
 
 		// start the server to be ready to accept log messages
@@ -583,7 +595,7 @@
 				+ "$MockFormatter");
 		p.put("java.util.logging.SocketHandler.host", "127.0.0.1");
 		p.put("java.util.logging.SocketHandler.port", "6666");
-		LogManager.getLogManager().readConfiguration(
+		LOG_MANAGER.readConfiguration(
 				EnvironmentHelper.PropertiesToInputStream(p));
 
 		// start the server to be ready to accept log messages
@@ -610,7 +622,7 @@
 				+ "$MockFormatter");
 		p.put("java.util.logging.SocketHandler.host", "127.0.0.1");
 		p.put("java.util.logging.SocketHandler.port", "6666");
-		LogManager.getLogManager().readConfiguration(
+		LOG_MANAGER.readConfiguration(
 				EnvironmentHelper.PropertiesToInputStream(p));
 
 		// start the server to be ready to accept log messages
@@ -635,7 +647,7 @@
 				+ "$MockFormatter");
 		p.put("java.util.logging.SocketHandler.host", "127.0.0.1");
 		p.put("java.util.logging.SocketHandler.port", "6666");
-		LogManager.getLogManager().readConfiguration(
+		LOG_MANAGER.readConfiguration(
 				EnvironmentHelper.PropertiesToInputStream(p));
 
 		// start the server to be ready to accept log messages
@@ -660,7 +672,7 @@
 				+ "$MockFormatter");
 		p.put("java.util.logging.SocketHandler.host", "127.0.0.1");
 		p.put("java.util.logging.SocketHandler.port", "6666");
-		LogManager.getLogManager().readConfiguration(
+		LOG_MANAGER.readConfiguration(
 				EnvironmentHelper.PropertiesToInputStream(p));
 
 		// start the server to be ready to accept log messages



Mime
View raw message