cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1095638 - /cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java
Date Thu, 21 Apr 2011 09:38:33 GMT
Author: cschneider
Date: Thu Apr 21 09:38:33 2011
New Revision: 1095638

URL: http://svn.apache.org/viewvc?rev=1095638&view=rev
Log:
CXF-3466 Fixed test to set log level to old level instead of INFO

Modified:
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java?rev=1095638&r1=1095637&r2=1095638&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java
(original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java
Thu Apr 21 09:38:33 2011
@@ -33,6 +33,7 @@ import java.util.Map;
 import java.util.TreeMap;
 import java.util.logging.Level;
 import java.util.logging.LogManager;
+import java.util.logging.Logger;
 
 import javax.net.ssl.KeyManager;
 import javax.net.ssl.KeyManagerFactory;
@@ -298,13 +299,14 @@ public class HTTPConduitTest extends Abs
     public void testLogLevelIssueCXF3466() throws Exception {
         startServer("Mortimer");
         Greeter mortimer = getMortimerGreeter();
-
-        LogManager.getLogManager().getLogger("").setLevel(Level.FINE);
+        Logger rootLogger = LogManager.getLogManager().getLogger("");
+        Level oldLevel = rootLogger.getLevel();
+        rootLogger.setLevel(Level.FINE);
         try {
             // Will throw exception Stream is closed if bug is present
             mortimer.sayHi();
         } finally {
-            LogManager.getLogManager().getLogger("").setLevel(Level.INFO);        
+            rootLogger.setLevel(oldLevel);
         }
     }
 



Mime
View raw message