cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreasm...@apache.org
Subject svn commit: r517668 - in /incubator/cxf/trunk: rt/core/src/main/java/org/apache/cxf/endpoint/ systests/src/test/java/org/apache/cxf/systest/ws/rm/
Date Tue, 13 Mar 2007 12:38:03 GMT
Author: andreasmyth
Date: Tue Mar 13 05:38:01 2007
New Revision: 517668

URL: http://svn.apache.org/viewvc?view=rev&rev=517668
Log:
Programmatic assignment of decoupled endpoint to guarantee uniqueness across tests and simply
cfg files for SequenceTest.

Added:
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/deferred.xml
      - copied unchanged from r517614, incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/anonymous-deferred.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/message-loss.xml
      - copied unchanged from r517614, incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/oneway-message-loss.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/no-offer.xml
      - copied, changed from r517614, incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-no-offer.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/seqlength1.xml
      - copied unchanged from r517614, incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/anonymous-seqlength1.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/seqlength10.xml
      - copied, changed from r517614, incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-seqlength2.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/suppressed.xml
      - copied unchanged from r517614, incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/anonymous-suppressed.xml
Removed:
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/anonymous-deferred.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/anonymous-seqlength1.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/anonymous-suppressed.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/anonymous.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/concurrent.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/nonanonymous-deferred.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/oneway-message-loss.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-message-loss.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-no-offer.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-seqlength2.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway.xml
Modified:
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/Messages.properties
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-endpoint-specific.xml

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java?view=diff&rev=517668&r1=517667&r2=517668
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/ClientImpl.java Tue
Mar 13 05:38:01 2007
@@ -296,7 +296,8 @@
             remaining -= (int)(end - start);
         }
         if (!Boolean.TRUE.equals(exchange.get(FINISHED))) {
-            LogUtils.log(LOG, Level.WARNING, "RESPONSE_TIMEOUT");
+            LogUtils.log(LOG, Level.WARNING, "RESPONSE_TIMEOUT",
+                exchange.get(OperationInfo.class).getName().toString());
         }
     }
 

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/Messages.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/Messages.properties?view=diff&rev=517668&r1=517667&r2=517668
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/Messages.properties
(original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/endpoint/Messages.properties
Tue Mar 13 05:38:01 2007
@@ -19,5 +19,5 @@
 #
 #
 NO_BINDING_FACTORY = Could not find factory for binding URI {0}.
-RESPONSE_TIMEOUT = Timed out waiting for response.
+RESPONSE_TIMEOUT = Timed out waiting for response to operation {0}.
 NO_OPERATION = No operation was found with the name {0}.

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java?view=diff&rev=517668&r1=517667&r2=517668
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
Tue Mar 13 05:38:01 2007
@@ -22,22 +22,28 @@
 import java.math.BigInteger;
 import java.util.Iterator;
 import java.util.List;
+import java.util.concurrent.Executor;
 import java.util.logging.Logger;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.endpoint.Client;
+import org.apache.cxf.frontend.ClientProxy;
 import org.apache.cxf.greeter_control.Control;
 import org.apache.cxf.greeter_control.ControlService;
 import org.apache.cxf.greeter_control.Greeter;
 import org.apache.cxf.greeter_control.GreeterService;
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.apache.cxf.transport.http.HTTPConduit;
+import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
 import org.apache.cxf.ws.rm.RMConstants;
 import org.apache.cxf.ws.rm.RMInInterceptor;
 import org.apache.cxf.ws.rm.RMManager;
 import org.apache.cxf.ws.rm.RMOutInterceptor;
 import org.apache.cxf.ws.rm.soap.RMSoapInterceptor;
+
 import org.junit.After;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
@@ -62,6 +68,9 @@
     private static final String GREETME_ACTION = null;
     private static final String GREETME_RESPONSE_ACTION = null;
 
+    private static int decoupledEndpointPort = 10000;
+    private static String decoupledEndpoint;
+
     private Bus controlBus;
     private Control control;
     private Bus greeterBus;
@@ -131,9 +140,9 @@
         control = cs.getControlPort();
 
         assertTrue("Failed to start greeter",
-            control.startGreeter("org/apache/cxf/systest/ws/rm/anonymous.xml"));
+            control.startGreeter("org/apache/cxf/systest/ws/rm/rminterceptors.xml"));
 
-        greeterBus = bf.createBus("org/apache/cxf/systest/ws/rm/anonymous.xml");
+        greeterBus = bf.createBus("org/apache/cxf/systest/ws/rm/rminterceptors.xml");
         BusFactory.setDefaultBus(greeterBus);
         removeRMInterceptors(greeterBus.getOutInterceptors());
         removeRMInterceptors(greeterBus.getOutFaultInterceptors());
@@ -161,7 +170,7 @@
         if (!doTestOnewayAnonymousAcks) {
             return;
         }
-        setupGreeter("org/apache/cxf/systest/ws/rm/anonymous.xml");
+        setupGreeter("org/apache/cxf/systest/ws/rm/rminterceptors.xml");
 
         greeter.greetMeOneWay("once");
         greeter.greetMeOneWay("twice");
@@ -193,7 +202,7 @@
         if (!doTestOnewayDeferredAnonymousAcks) {
             return;
         }
-        setupGreeter("org/apache/cxf/systest/ws/rm/anonymous-deferred.xml");
+        setupGreeter("org/apache/cxf/systest/ws/rm/deferred.xml");
 
         greeter.greetMeOneWay("once");
         greeter.greetMeOneWay("twice");
@@ -232,7 +241,7 @@
         if (!doTestOnewayDeferredNonAnonymousAcks) {
             return;
         }
-        setupGreeter("org/apache/cxf/systest/ws/rm/nonanonymous-deferred.xml");
+        setupGreeter("org/apache/cxf/systest/ws/rm/deferred.xml", true);
 
         greeter.greetMeOneWay("once");
         greeter.greetMeOneWay("twice");
@@ -286,7 +295,7 @@
         if (!doTestOnewayAnonymousAcksSequenceLength1) {
             return;
         }
-        setupGreeter("org/apache/cxf/systest/ws/rm/anonymous-seqlength1.xml");
+        setupGreeter("org/apache/cxf/systest/ws/rm/seqlength1.xml");
 
         greeter.greetMeOneWay("once");
         greeter.greetMeOneWay("twice");
@@ -330,7 +339,7 @@
         if (!doTestOnewayAnonymousAcksSupressed) {
             return;
         }
-        setupGreeter("org/apache/cxf/systest/ws/rm/anonymous-suppressed.xml");
+        setupGreeter("org/apache/cxf/systest/ws/rm/suppressed.xml");
 
         greeter.greetMeOneWay("once");
         greeter.greetMeOneWay("twice");
@@ -377,7 +386,7 @@
         if (!doTestTwowayNonAnonymous) {
             return;
         }
-        setupGreeter("org/apache/cxf/systest/ws/rm/twoway.xml");
+        setupGreeter("org/apache/cxf/systest/ws/rm/rminterceptors.xml", true);
 
         greeter.greetMe("one");
         greeter.greetMe("two");
@@ -427,7 +436,7 @@
         if (!doTestTwowayNonAnonymousEndpointSpecific) {
             return;
         }
-        setupGreeter("org/apache/cxf/systest/ws/rm/twoway-endpoint-specific.xml");
+        setupGreeter("org/apache/cxf/systest/ws/rm/twoway-endpoint-specific.xml", true);
 
 
         greeter.greetMe("one");
@@ -476,7 +485,7 @@
         if (!doTestTwowayNonAnonymousDeferred) {
             return;
         }
-        setupGreeter("org/apache/cxf/systest/ws/rm/twoway-deferred.xml");
+        setupGreeter("org/apache/cxf/systest/ws/rm/deferred.xml", true);
 
         greeter.greetMe("one");
         greeter.greetMe("two");
@@ -542,7 +551,7 @@
         if (!doTestTwowayNonAnonymousMaximumSequenceLength2) {
             return;
         }
-        setupGreeter("org/apache/cxf/systest/ws/rm/twoway-seqlength2.xml");
+        setupGreeter("org/apache/cxf/systest/ws/rm/seqlength10.xml", true);
         
         RMManager manager = greeterBus.getExtension(RMManager.class);
         assertEquals("Unexpected maximum sequence length.", BigInteger.TEN, 
@@ -600,7 +609,7 @@
         if (!doTestOnewayMessageLoss) {
             return;
         }
-        setupGreeter("org/apache/cxf/systest/ws/rm/oneway-message-loss.xml");
+        setupGreeter("org/apache/cxf/systest/ws/rm/message-loss.xml");
         
         greeterBus.getOutInterceptors().add(new MessageLossSimulator());
         RMManager manager = greeterBus.getExtension(RMManager.class);
@@ -650,7 +659,7 @@
         if (!doTestTwowayMessageLoss) {
             return;
         }
-        setupGreeter("org/apache/cxf/systest/ws/rm/twoway-message-loss.xml");
+        setupGreeter("org/apache/cxf/systest/ws/rm/message-loss.xml", true);
         
         greeterBus.getOutInterceptors().add(new MessageLossSimulator());
         RMManager manager = greeterBus.getExtension(RMManager.class);
@@ -707,7 +716,7 @@
         if (!doTestTwowayNonAnonymousNoOffer) {
             return;
         }
-        setupGreeter("org/apache/cxf/systest/ws/rm/twoway-no-offer.xml");        
+        setupGreeter("org/apache/cxf/systest/ws/rm/no-offer.xml", true);        
         
         greeter.greetMe("one");
         // greeter.greetMe("two");
@@ -743,7 +752,7 @@
         if (!doTestConcurrency) {
             return;
         }
-        setupGreeter("org/apache/cxf/systest/ws/rm/concurrent.xml");
+        setupGreeter("org/apache/cxf/systest/ws/rm/rminterceptors.xml", true);
 
         for (int i = 0; i < 5; i++) {
             greeter.greetMeAsync(Integer.toString(i));
@@ -767,6 +776,14 @@
     // --- test utilities ---
 
     private void setupGreeter(String cfgResource) {
+        setupGreeter(cfgResource, false);
+    }
+
+    private void setupGreeter(String cfgResource, boolean useDecoupledEndpoint) {
+        setupGreeter(cfgResource, useDecoupledEndpoint, null);
+    }
+    
+    private void setupGreeter(String cfgResource, boolean useDecoupledEndpoint, Executor
executor) {
         
         SpringBusFactory bf = new SpringBusFactory();
         
@@ -788,8 +805,30 @@
         assertTrue("Failed to start greeter", control.startGreeter(cfgResource));
         
         GreeterService gs = new GreeterService();
+
+        if (null != executor) {
+            gs.setExecutor(executor);
+        }
+
         greeter = gs.getGreeterPort();
         LOG.fine("Created greeter client.");
+
+        if (!useDecoupledEndpoint) {
+            return;
+        }
+
+        // programatically configure decoupled endpoint that is guaranteed to
+        // be unique across all test cases
+        
+        decoupledEndpointPort--;
+        decoupledEndpoint = "http://localhost:" + decoupledEndpointPort + "/decoupled_endpoint";
+
+        Client c = ClientProxy.getClient(greeter);
+        HTTPConduit hc = (HTTPConduit)(c.getConduit());
+        HTTPClientPolicy cp = hc.getClient();
+        cp.setDecoupledEndpoint(decoupledEndpoint);
+
+        LOG.fine("Using decoupled endpoint: " + cp.getDecoupledEndpoint());
     }
     
     private void awaitMessages(int nExpectedOut, int nExpectedIn) {

Copied: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/no-offer.xml
(from r517614, incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-no-offer.xml)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/no-offer.xml?view=diff&rev=517668&p1=incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-no-offer.xml&r1=517614&p2=incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/no-offer.xml&r2=517668
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-no-offer.xml
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/no-offer.xml Tue
Mar 13 05:38:01 2007
@@ -26,10 +26,6 @@
 http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schema/transports/http.xsd
 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
   
-    <http:conduit id="{http://cxf.apache.org/greeter_control}GreeterPort.http-conduit">
-      <http:client DecoupledEndpoint="http://localhost:9995/decoupled_endpoint"/>
-    </http:conduit>
-    
     <bean id="org.apache.cxf.ws.rm.RMManager" class="org.apache.cxf.ws.rm.RMManager">
         <property name="bus" ref="cxf"/>  
         <property name="destinationPolicy">

Copied: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/seqlength10.xml
(from r517614, incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-seqlength2.xml)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/seqlength10.xml?view=diff&rev=517668&p1=incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-seqlength2.xml&r1=517614&p2=incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/seqlength10.xml&r2=517668
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-seqlength2.xml
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/seqlength10.xml
Tue Mar 13 05:38:01 2007
@@ -26,10 +26,6 @@
 http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schema/transports/http.xsd
 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
   
-    <http:conduit id="{http://cxf.apache.org/greeter_control}GreeterPort.http-conduit">
-      <http:client DecoupledEndpoint="http://localhost:9996/decoupled_endpoint"/>
-    </http:conduit>
-    
     <bean id="org.apache.cxf.ws.rm.RMManager" class="org.apache.cxf.ws.rm.RMManager">
         <property name="bus" ref="cxf"/>
         <property name="sourcePolicy">

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-endpoint-specific.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-endpoint-specific.xml?view=diff&rev=517668&r1=517667&r2=517668
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-endpoint-specific.xml
(original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/ws/rm/twoway-endpoint-specific.xml
Tue Mar 13 05:38:01 2007
@@ -26,10 +26,6 @@
 http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schema/transports/http.xsd
 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
   
-    <http:conduit id="{http://cxf.apache.org/greeter_control}GreeterPort.http-conduit">
-      <http:client DecoupledEndpoint="http://localhost:9991/decoupled_endpoint"/>
-    </http:conduit>
-    
     <!-- Endpoint Level Interceptors-->
     <!-- Inserted From JaxWsEndpointImpl, EndpointImpl-->
     <bean id="wrapperClassIn" class="org.apache.cxf.jaxws.interceptors.WrapperClassInInterceptor"/>



Mime
View raw message