cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1341636 - in /cxf/branches/2.5.x-fixes: ./ systests/jaxws/ systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/ systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/
Date Tue, 22 May 2012 21:22:11 GMT
Author: dkulp
Date: Tue May 22 21:22:10 2012
New Revision: 1341636

URL: http://svn.apache.org/viewvc?rev=1341636&view=rev
Log:
Merged revisions 1338391 via  svn merge from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1338391 | dkulp | 2012-05-14 16:41:59 -0400 (Mon, 14 May 2012) | 1 line
  
  jaxws now forkmode once
........

Modified:
    cxf/branches/2.5.x-fixes/   (props changed)
    cxf/branches/2.5.x-fixes/systests/jaxws/pom.xml
    cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java
    cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerWithHugeResponseTest.java
    cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerWithMalformedResponseTest.java
    cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchXMLClientServerTest.java
    cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/Server.java
    cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/AddNumbersServiceUnwrap.java

Propchange: cxf/branches/2.5.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.5.x-fixes/systests/jaxws/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/jaxws/pom.xml?rev=1341636&r1=1341635&r2=1341636&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/jaxws/pom.xml (original)
+++ cxf/branches/2.5.x-fixes/systests/jaxws/pom.xml Tue May 22 21:22:10 2012
@@ -214,8 +214,4 @@
             <artifactId>xalan</artifactId>
         </dependency>
     </dependencies>
-    <properties>
-        <cxf.surefire.fork.mode>pertest</cxf.surefire.fork.mode>
-    </properties>
-
 </project>

Modified: cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java?rev=1341636&r1=1341635&r2=1341636&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java
(original)
+++ cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java
Tue May 22 21:22:10 2012
@@ -55,6 +55,7 @@ import org.w3c.dom.Node;
 import org.xml.sax.InputSource;
 
 
+import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
 import org.apache.cxf.helpers.DOMUtils;
@@ -89,6 +90,7 @@ public class DispatchClientServerTest ex
     public static class Server extends AbstractBusTestServerBase {        
 
         protected void run() {
+            setBus(BusFactory.getDefaultBus());
             Object implementor = new GreeterImpl();
             String address = "http://localhost:"
                 + TestUtil.getPortNumber(DispatchClientServerTest.class)
@@ -103,6 +105,8 @@ public class DispatchClientServerTest ex
             
             ep.setProperties(properties);
             ep.publish(address);
+            BusFactory.setDefaultBus(null);
+            BusFactory.setThreadDefaultBus(null);
         }
 
         public static void main(String[] args) {
@@ -120,7 +124,8 @@ public class DispatchClientServerTest ex
 
     @BeforeClass
     public static void startServers() throws Exception {
-        assertTrue("server did not launch correctly", launchServer(Server.class));
+        assertTrue("server did not launch correctly", launchServer(Server.class, true));
+        createStaticBus();
     }
     
     @org.junit.Before
@@ -586,7 +591,7 @@ public class DispatchClientServerTest ex
         
         this.configFileName = "org/apache/cxf/systest/dispatch/client-config.xml";
         SpringBusFactory bf = (SpringBusFactory)SpringBusFactory.newInstance();
-        bus = bf.createBus(configFileName, false);
+        Bus bus = bf.createBus(configFileName, false);
         
         URL wsdl = getClass().getResource("/wsdl/hello_world.wsdl");
         assertNotNull(wsdl);

Modified: cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerWithHugeResponseTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerWithHugeResponseTest.java?rev=1341636&r1=1341635&r2=1341636&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerWithHugeResponseTest.java
(original)
+++ cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerWithHugeResponseTest.java
Tue May 22 21:22:10 2012
@@ -38,6 +38,7 @@ import javax.xml.ws.Service;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.interceptor.LoggingInInterceptor;
 import org.apache.cxf.interceptor.LoggingOutInterceptor;
+import org.apache.cxf.staxutils.StaxUtils;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 import org.apache.cxf.testutil.common.TestUtil;
@@ -64,7 +65,6 @@ public class DispatchClientServerWithHug
                 + TestUtil.getPortNumber(DispatchClientServerWithHugeResponseTest.class)
                 + "/SOAPDispatchService/SoapDispatchPort";
             Endpoint.publish(address, implementor);
-
         }
 
         public static void main(String[] args) {
@@ -87,13 +87,17 @@ public class DispatchClientServerWithHug
     
     @org.junit.Before
     public void setUp() {
-        System.setProperty("org.apache.cxf.staxutils.innerElementLevelThreshold", "12");
-        System.setProperty("org.apache.cxf.staxutils.innerElementCountThreshold", "12");
+        StaxUtils.setInnerElementCountThreshold(12);
+        StaxUtils.setInnerElementLevelThreshold(12);
         BusFactory.getDefaultBus().getOutInterceptors().add(new LoggingOutInterceptor());
         BusFactory.getDefaultBus().getInInterceptors().add(new LoggingInInterceptor());
     }
     
-    
+    @AfterClass
+    public static void cleanup() throws Exception {
+        StaxUtils.setInnerElementCountThreshold(-1);
+        StaxUtils.setInnerElementLevelThreshold(-1);
+    }   
    
     @Test
     public void testStackOverflowErrorForSOAPMessageWithHugeResponse() throws Exception {
@@ -170,7 +174,7 @@ public class DispatchClientServerWithHug
     }
 
     @Test
-    public void testElementCountThresholdfForSOAPMessageWithHugeResponse() throws Exception
{
+    public void testElementCountThresholdfForSOAPMessageWithHugeResponse() throws Throwable
{
         HugeResponseInterceptor hugeResponseInterceptor = 
             new HugeResponseInterceptor(ResponseInterceptorType.ElementCountThreshold);
         BusFactory.getDefaultBus().getInInterceptors().add(hugeResponseInterceptor);
@@ -200,6 +204,12 @@ public class DispatchClientServerWithHug
             fail("We should not have encountered a timeout, " 
                 + "should get some exception tell me stackoverflow");
         } catch (Throwable e) {
+            if (e.getCause() == null) {
+                throw e;
+            }
+            if (e.getCause().getMessage() == null) {
+                throw e;
+            }
             assertTrue(e.getCause().getMessage().startsWith("reach the innerElementCountThreshold"));
         } finally {
             BusFactory.getDefaultBus().getInInterceptors().remove(hugeResponseInterceptor);

Modified: cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerWithMalformedResponseTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerWithMalformedResponseTest.java?rev=1341636&r1=1341635&r2=1341636&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerWithMalformedResponseTest.java
(original)
+++ cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerWithMalformedResponseTest.java
Tue May 22 21:22:10 2012
@@ -60,6 +60,7 @@ public class DispatchClientServerWithMal
     public static class Server extends AbstractBusTestServerBase {        
 
         protected void run() {
+            setBus(BusFactory.getDefaultBus());
             Object implementor = new GreeterImpl();
             String address = "http://localhost:"
                 + TestUtil.getPortNumber(DispatchClientServerWithMalformedResponseTest.class)
@@ -83,14 +84,16 @@ public class DispatchClientServerWithMal
 
     @BeforeClass
     public static void startServers() throws Exception {
-        assertTrue("server did not launch correctly", launchServer(Server.class));
+        createStaticBus();
+        assertTrue("server did not launch correctly", launchServer(Server.class, true));
     }
     
     @org.junit.Before
     public void setUp() {
-        BusFactory.getDefaultBus().getOutInterceptors().add(new LoggingOutInterceptor());
-        BusFactory.getDefaultBus().getInInterceptors().add(new LoggingInInterceptor());
-        BusFactory.getDefaultBus().getInInterceptors().add(new MalformedResponseInterceptor());
+        BusFactory.setThreadDefaultBus(getStaticBus());
+        BusFactory.getThreadDefaultBus().getOutInterceptors().add(new LoggingOutInterceptor());
+        BusFactory.getThreadDefaultBus().getInInterceptors().add(new LoggingInInterceptor());
+        BusFactory.getThreadDefaultBus().getInInterceptors().add(new MalformedResponseInterceptor());
     }
     
     private void waitForFuture(Future<?> fd) throws Exception {

Modified: cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchXMLClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchXMLClientServerTest.java?rev=1341636&r1=1341635&r2=1341636&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchXMLClientServerTest.java
(original)
+++ cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchXMLClientServerTest.java
Tue May 22 21:22:10 2012
@@ -54,7 +54,7 @@ public class DispatchXMLClientServerTest
     private static String port = TestUtil.getPortNumber(DispatchXMLClientServerTest.class);
     @BeforeClass
     public static void startServers() throws Exception {
-        
+        createStaticBus();
         assertTrue("server did not launch correctly", launchServer(Server.class));
     }
 

Modified: cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/Server.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/Server.java?rev=1341636&r1=1341635&r2=1341636&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/Server.java
(original)
+++ cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/Server.java
Tue May 22 21:22:10 2012
@@ -22,6 +22,7 @@ package org.apache.cxf.systest.dispatch;
 
 import javax.xml.ws.Endpoint;
 
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 import org.apache.cxf.testutil.common.TestUtil;
 import org.apache.hello_world_xml_http.wrapped.GreeterImpl;
@@ -30,6 +31,7 @@ import org.apache.hello_world_xml_http.w
 public class Server extends AbstractBusTestServerBase {        
 
     protected void run() {
+        setBus(BusFactory.getDefaultBus());
         Object implementor = new GreeterImpl();
         String address = "http://localhost:"
             + TestUtil.getPortNumber(DispatchXMLClientServerTest.class)

Modified: cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/AddNumbersServiceUnwrap.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/AddNumbersServiceUnwrap.java?rev=1341636&r1=1341635&r2=1341636&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/AddNumbersServiceUnwrap.java
(original)
+++ cxf/branches/2.5.x-fixes/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/AddNumbersServiceUnwrap.java
Tue May 22 21:22:10 2012
@@ -18,7 +18,6 @@
  */
 package org.apache.cxf.systest.handlers;
 
-import java.net.MalformedURLException;
 import java.net.URL;
 import javax.xml.namespace.QName;
 import javax.xml.ws.Service;
@@ -31,22 +30,12 @@ import javax.xml.ws.WebServiceFeature;
                   targetNamespace = "http://apache.org/handlers") 
 public class AddNumbersServiceUnwrap extends Service {
 
-    public static final URL WSDL_LOCATION;
+    public static final URL WSDL_LOCATION = null;
     public static final QName SERVICE = new QName("http://apache.org/handlers",
                                                   "AddNumbersService");
     public static final QName ADD_NUMBERS_PORT = new QName("http://apache.org/handlers",
                                                          "AddNumbersPort");
-    static {
-        URL url = null;
-        try {
-            url = new URL("/wsdl/addNumbers.wsdl");
-        } catch (MalformedURLException e) {
-            System.err.println("Can not initialize the default wsdl "
-                               + "from file:testutils/src/main/resources/wsdl/addNumbers.wsdl");
-            // e.printStackTrace();
-        }
-        WSDL_LOCATION = url;
-    }
+
 
     public AddNumbersServiceUnwrap(URL wsdlLocation) {
         super(wsdlLocation, SERVICE);



Mime
View raw message