cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1341630 - in /cxf/branches/2.5.x-fixes: ./ parent/ systests/transports/ systests/transports/src/test/java/org/apache/cxf/systest/http/ systests/transports/src/test/java/org/apache/cxf/systest/http/auth/ systests/transports/src/test/java/or...
Date Tue, 22 May 2012 21:18:41 GMT
Author: dkulp
Date: Tue May 22 21:18:40 2012
New Revision: 1341630

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

........
  r1338280 | dkulp | 2012-05-14 12:40:34 -0400 (Mon, 14 May 2012) | 1 line
  
  More cleanup so systests/transports can be forkmode once
........

Modified:
    cxf/branches/2.5.x-fixes/   (props changed)
    cxf/branches/2.5.x-fixes/parent/pom.xml
    cxf/branches/2.5.x-fixes/systests/transports/pom.xml
    cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java
    cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/auth/DigestAuthTest.java
    cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
    cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/GreeterImpl.java
    cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/continuations/ClientServerWrappedContinuationTest.java
    cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/multitransport/MultiTransportClientServerTest.java
    cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java

Propchange: cxf/branches/2.5.x-fixes/
            ('svn:mergeinfo' removed)

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

Modified: cxf/branches/2.5.x-fixes/parent/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/parent/pom.xml?rev=1341630&r1=1341629&r2=1341630&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/parent/pom.xml (original)
+++ cxf/branches/2.5.x-fixes/parent/pom.xml Tue May 22 21:18:40 2012
@@ -352,10 +352,6 @@
                             <derby.system.home>${basedir}/target/derby</derby.system.home>
                             <spring.validation.mode>${cxf.spring.validation.mode}</spring.validation.mode>
                             <server.launcher.vmargs>${cxf.server.launcher.vmargs}</server.launcher.vmargs>
-                            <!-- If we close the port after a client in the same JVM has
opened a keep-alive
-                            connection, on some Linux's, the socket remains consumed until
-                            some timeout occurs.   That may cause some tests to timeout/hang.
-->
-                            <org.apache.cxf.transports.http_jetty.DontClosePort>false</org.apache.cxf.transports.http_jetty.DontClosePort>
                         </systemPropertyVariables>
                     </configuration>
                 </plugin>

Modified: cxf/branches/2.5.x-fixes/systests/transports/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transports/pom.xml?rev=1341630&r1=1341629&r2=1341630&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transports/pom.xml (original)
+++ cxf/branches/2.5.x-fixes/systests/transports/pom.xml Tue May 22 21:18:40 2012
@@ -294,8 +294,5 @@
         </dependency>
 
     </dependencies>
-    <properties>
-        <cxf.surefire.fork.mode>pertest</cxf.surefire.fork.mode>
-    </properties>
 
 </project>

Modified: cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java?rev=1341630&r1=1341629&r2=1341630&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java
(original)
+++ cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java
Tue May 22 21:18:40 2012
@@ -69,7 +69,7 @@ import org.apache.cxf.transports.http.co
 import org.apache.hello_world.Greeter;
 import org.apache.hello_world.services.SOAPService;
 
-import org.junit.BeforeClass;
+import org.junit.AfterClass;
 import org.junit.Test;
 
 import org.springframework.context.ApplicationContext;
@@ -200,6 +200,7 @@ public class HTTPConduitTest extends Abs
         if (servers.contains(name)) {
             return true;
         }
+        Bus bus = BusFactory.getThreadDefaultBus(false);
         URL serverC =
             Server.class.getResource("resources/" + name + ".cxf");
         boolean server = launchServer(Server.class, null,
@@ -211,14 +212,21 @@ public class HTTPConduitTest extends Abs
         if (server) {
             servers.add(name);
         }
+        BusFactory.setDefaultBus(null);
+        BusFactory.setThreadDefaultBus(bus);
         return server;
     }
     
-    @BeforeClass
-    public static void setProps() {
-        // TODO: Do I need this?
-        System.setProperty("org.apache.cxf.bus.factory", 
-            "org.apache.cxf.bus.CXFBusFactory");
+    @AfterClass
+    public static void cleanUp() {
+        Bus b = BusFactory.getDefaultBus(false);
+        if (b != null) {
+            b.shutdown(true);
+        }
+        b = BusFactory.getThreadDefaultBus(false);
+        if (b != null) {
+            b.shutdown(true);
+        }
     }
 
     public static KeyStore getKeyStore(String ksType, String file, String ksPassword)

Modified: cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/auth/DigestAuthTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/auth/DigestAuthTest.java?rev=1341630&r1=1341629&r2=1341630&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/auth/DigestAuthTest.java
(original)
+++ cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http/auth/DigestAuthTest.java
Tue May 22 21:18:40 2012
@@ -49,10 +49,11 @@ public class DigestAuthTest extends Abst
     }
     
     @BeforeClass
-    public static void startServer() {
+    public static void startServer() throws Exception {
         launchServer(DigestServer.class);
+        createStaticBus();
     }
-
+    
     @Test    
     public void testDigestAuth() throws Exception {
         URL wsdl = getClass().getResource("../resources/greeting.wsdl");

Modified: cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java?rev=1341630&r1=1341629&r2=1341630&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
(original)
+++ cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
Tue May 22 21:18:40 2012
@@ -46,9 +46,7 @@ import org.apache.cxf.transport.http_jet
 import org.eclipse.jetty.server.Handler;
 import org.eclipse.jetty.webapp.WebAppContext;
 
-import org.junit.After;
 import org.junit.Assert;
-import org.junit.Before;
 import org.junit.Test;
 
 import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
@@ -64,30 +62,13 @@ import org.springframework.core.io.Resou
 public class EngineLifecycleTest extends Assert {
     private static final String PORT1 = TestUtil.getPortNumber(EngineLifecycleTest.class,
1);
     private static final String PORT2 = TestUtil.getPortNumber(EngineLifecycleTest.class,
2);
-    private String close;
-    private GenericApplicationContext applicationContext;
-    
-    
+    private GenericApplicationContext applicationContext;    
         
     private void readBeans(Resource beanResource) {
         XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(applicationContext);
         reader.loadBeanDefinitions(beanResource);
     }
     
-    @Before 
-    public void setSystemProperties() {
-        close = System.getProperty("org.apache.cxf.transports.http_jetty.DontClosePort");
       
-        System.setProperty("org.apache.cxf.transports.http_jetty.DontClosePort", "false");
-        
-    }
-    
-    @After
-    public void resetSystemProperties() {
-        if (close != null) {
-            System.setProperty("org.apache.cxf.transports.http_jetty.DontClosePort", close);
-        }
-    }
-    
     public void setUpBus(boolean includeService) throws Exception {
         applicationContext = new GenericApplicationContext();
         readBeans(new ClassPathResource("/org/apache/cxf/systest/http_jetty/cxf.xml"));

Modified: cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/GreeterImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/GreeterImpl.java?rev=1341630&r1=1341629&r2=1341630&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/GreeterImpl.java
(original)
+++ cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/GreeterImpl.java
Tue May 22 21:18:40 2012
@@ -50,9 +50,9 @@ public class GreeterImpl implements Gree
     }
 
     public String greetMeLater(long delay) {
-        System.out.println("\n\n*** GreetMeLater called with: " + delay
-                           + " at: " + new Date().toString()
-                           + "***\n\n");
+        //System.out.println("\n\n*** GreetMeLater called with: " + delay
+        //                   + " at: " + new Date().toString()
+        //                   + "***\n\n");
         if (delay > 0) {
             try {
                 Thread.sleep(delay);

Modified: cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/continuations/ClientServerWrappedContinuationTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/continuations/ClientServerWrappedContinuationTest.java?rev=1341630&r1=1341629&r2=1341630&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/continuations/ClientServerWrappedContinuationTest.java
(original)
+++ cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/continuations/ClientServerWrappedContinuationTest.java
Tue May 22 21:18:40 2012
@@ -52,6 +52,7 @@ public class ClientServerWrappedContinua
         protected void run() {
             SpringBusFactory bf = new SpringBusFactory();
             Bus bus = bf.createBus(SERVER_CONFIG_FILE);
+            setBus(bus);
             BusFactory.setDefaultBus(bus);
             
             Object implementor = new HelloImplWithWrapppedContinuation();
@@ -93,6 +94,7 @@ public class ClientServerWrappedContinua
         assertNotNull(service);
         final HelloContinuation helloPort = service.getHelloContinuationPort();
         doTest(helloPort);
+        bus.shutdown(true);
     }
         
     @Test
@@ -109,6 +111,7 @@ public class ClientServerWrappedContinua
         assertNotNull(service);
         final HelloContinuation helloPort = service.getHelloContinuationPort();
         doTest(helloPort);
+        bus.shutdown(true);
     }
 
     private void doTest(final HelloContinuation helloPort) throws Exception {

Modified: cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/multitransport/MultiTransportClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/multitransport/MultiTransportClientServerTest.java?rev=1341630&r1=1341629&r2=1341630&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/multitransport/MultiTransportClientServerTest.java
(original)
+++ cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/multitransport/MultiTransportClientServerTest.java
Tue May 22 21:18:40 2012
@@ -88,7 +88,7 @@ public class MultiTransportClientServerT
                    launchServer(EmbeddedJMSBrokerLauncher.class, props, null));
 
         assertTrue("server did not launch correctly", launchServer(MyServer.class));
-        
+        createStaticBus();
     }
     
     // the purpose of this test shows how one service include two ports with different

Modified: cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java?rev=1341630&r1=1341629&r2=1341630&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java
(original)
+++ cxf/branches/2.5.x-fixes/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java
Tue May 22 21:18:40 2012
@@ -46,6 +46,7 @@ public class NoSpringServletClientTest e
     @BeforeClass
     public static void startServers() throws Exception {
         assertTrue("server did not launch correctly", launchServer(NoSpringServletServer.class));
+        createStaticBus();
     }
 
     @Test



Mime
View raw message