cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1345422 - in /cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm: DecoupledClientServerTest.java DeliveryAssuranceOnewayTest.java SequenceTest.java
Date Sat, 02 Jun 2012 02:43:50 GMT
Author: dkulp
Date: Sat Jun  2 02:43:50 2012
New Revision: 1345422

URL: http://svn.apache.org/viewvc?rev=1345422&view=rev
Log:
A little more cleanup

Modified:
    cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerTest.java
    cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DeliveryAssuranceOnewayTest.java
    cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java

Modified: cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerTest.java?rev=1345422&r1=1345421&r2=1345422&view=diff
==============================================================================
--- cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerTest.java
(original)
+++ cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DecoupledClientServerTest.java
Sat Jun  2 02:43:50 2012
@@ -50,7 +50,6 @@ public class DecoupledClientServerTest e
     public static final String DECOUPLE_PORT = allocatePort(DecoupledClientServerTest.class);
 
     private static final Logger LOG = LogUtils.getLogger(DecoupledClientServerTest.class);
-    private Bus bus;
 
     public static class Server extends AbstractBusTestServerBase {
         Endpoint ep;

Modified: cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DeliveryAssuranceOnewayTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DeliveryAssuranceOnewayTest.java?rev=1345422&r1=1345421&r2=1345422&view=diff
==============================================================================
--- cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DeliveryAssuranceOnewayTest.java
(original)
+++ cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/DeliveryAssuranceOnewayTest.java
Sat Jun  2 02:43:50 2012
@@ -50,13 +50,10 @@ import org.apache.cxf.greeter_control.Gr
 import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.helpers.XPathUtils;
 import org.apache.cxf.systest.ws.util.ConnectionHelper;
-import org.apache.cxf.test.TestUtilities;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.cxf.ws.rm.RMManager;
 
 import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
 import org.junit.Test;
 
 /**
@@ -73,18 +70,6 @@ public class DeliveryAssuranceOnewayTest
     private Endpoint endpoint;
     private Bus greeterBus;
     private Greeter greeter;
-
-
-    @BeforeClass
-    public static void setProps() throws Exception {
-        TestUtilities.setKeepAliveSystemProperty(false);
-    }
-    
-    @AfterClass
-    public static void cleanup() {
-        TestUtilities.recoverKeepAliveSystemProperty();
-    }
-            
     
     @After
     public void tearDown() throws Exception {
@@ -364,7 +349,7 @@ public class DeliveryAssuranceOnewayTest
         }
         LOG.fine("Created greeter client.");
 
-        ConnectionHelper.setKeepAliveConnection(greeter, true);
+        ConnectionHelper.setKeepAliveConnection(greeter, false);
     }
     
     private void stopClient() {
@@ -403,6 +388,7 @@ public class DeliveryAssuranceOnewayTest
     private void awaitMessages(int nExpectedIn, int delay, int timeout) {
         int waited = 0;
         int nIn = 0;
+        long start = System.currentTimeMillis();
         while (waited <= timeout) {                
             synchronized (GreeterProvider.CALL_ARGS) {
                 nIn = GreeterProvider.CALL_ARGS.size();
@@ -417,6 +403,12 @@ public class DeliveryAssuranceOnewayTest
             }
             waited += 100;
         }
+        // we'll use the delay amount or at least double the original amount
+        // of time, which ever is less, to wait for additional messages.
+        long total = System.currentTimeMillis() - start;
+        if (delay > total) {
+            delay = (int)total;
+        }
         try {
             Thread.sleep(delay);
         } catch (InterruptedException ex) {

Modified: cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java?rev=1345422&r1=1345421&r2=1345422&view=diff
==============================================================================
--- cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
(original)
+++ cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/SequenceTest.java
Sat Jun  2 02:43:50 2012
@@ -68,7 +68,6 @@ import org.apache.cxf.phase.AbstractPhas
 import org.apache.cxf.phase.Phase;
 import org.apache.cxf.systest.ws.util.ConnectionHelper;
 import org.apache.cxf.systest.ws.util.MessageFlow;
-import org.apache.cxf.test.TestUtilities;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 import org.apache.cxf.testutil.recorders.InMessageRecorder;
 import org.apache.cxf.testutil.recorders.MessageRecorder;
@@ -82,7 +81,6 @@ import org.apache.cxf.ws.rm.RMManager;
 import org.apache.cxf.ws.rm.RMProperties;
 
 import org.junit.After;
-import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
@@ -119,15 +117,9 @@ public class SequenceTest extends Abstra
 
     @BeforeClass
     public static void startServers() throws Exception {
-        TestUtilities.setKeepAliveSystemProperty(false);
         assertTrue("server did not launch correctly", launchServer(Server.class));
     }
     
-    @AfterClass
-    public static void cleanup() {
-        TestUtilities.recoverKeepAliveSystemProperty();
-    }
-            
     
     @After
     public void tearDown() throws Exception {



Mime
View raw message