cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1095635 - in /cxf/trunk: rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java
Date Thu, 21 Apr 2011 09:25:10 GMT
Author: cschneider
Date: Thu Apr 21 09:25:09 2011
New Revision: 1095635

URL: http://svn.apache.org/viewvc?rev=1095635&view=rev
Log:
CXF-3466 Add integration test for issue. Remove connection.getContentType to avoid exception

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

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java?rev=1095635&r1=1095634&r2=1095635&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/HTTPConduit.java
Thu Apr 21 09:25:09 2011
@@ -1280,7 +1280,7 @@ public class HTTPConduit 
                     + connection.getURL()
                     + " Conduit :"
                     + conduitName
-                    + "\nContent-Type: " + connection.getContentType() + "\n");
+                    + "\n");
             }
         }
         

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=1095635&r1=1095634&r2=1095635&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:25:09 2011
@@ -23,6 +23,7 @@ package org.apache.cxf.systest.http;
 import java.io.File;
 import java.io.FileInputStream;
 import java.io.IOException;
+import java.net.MalformedURLException;
 import java.net.URL;
 import java.security.GeneralSecurityException;
 import java.security.KeyStore;
@@ -30,6 +31,8 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
 import java.util.TreeMap;
+import java.util.logging.Level;
+import java.util.logging.LogManager;
 
 import javax.net.ssl.KeyManager;
 import javax.net.ssl.KeyManagerFactory;
@@ -267,11 +270,8 @@ public class HTTPConduitTest extends Abs
         
         return fac.getTrustManagers();
     }
-    
-    
-    @Test
-    public void testBasicConnection() throws Exception {
-        startServer("Mortimer");
+
+    private Greeter getMortimerGreeter() throws MalformedURLException {
         URL wsdl = getClass().getResource("resources/greeting.wsdl");
         assertNotNull("WSDL is null", wsdl);
 
@@ -281,12 +281,33 @@ public class HTTPConduitTest extends Abs
         Greeter mortimer = service.getPort(mortimerQ, Greeter.class);
         assertNotNull("Port is null", mortimer);
         updateAddressPort(mortimer, PORT0);
+        return mortimer;
+    }
+
+    @Test
+    public void testBasicConnection() throws Exception {
+        startServer("Mortimer");
+        Greeter mortimer = getMortimerGreeter();
 
         String answer = mortimer.sayHi();
         assertTrue("Unexpected answer: " + answer, 
                 "Bonjour from Mortimer".equals(answer));
     }
 
+    @Test
+    public void testLogLevelIssueCXF3466() throws Exception {
+        startServer("Mortimer");
+        Greeter mortimer = getMortimerGreeter();
+
+        LogManager.getLogManager().getLogger("").setLevel(Level.FINE);
+        try {
+            // Will throw exception Stream is closed if bug is present
+            mortimer.sayHi();
+        } finally {
+            LogManager.getLogManager().getLogger("").setLevel(Level.INFO);        
+        }
+    }
+
     /**
      * This methods tests that a conduit that is not configured
      * to follow redirects will not. The default is not to 



Mime
View raw message