You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2012/03/22 20:37:19 UTC

svn commit: r1304006 - in /cxf/trunk: 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/org/apache/cxf/systest/http_jetty/ systests/trans...

Author: dkulp
Date: Thu Mar 22 19:37:17 2012
New Revision: 1304006

URL: http://svn.apache.org/viewvc?rev=1304006&view=rev
Log:
Start cleaning up some of the systests to maybe flip to forkmode once at
some point.

Modified:
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/BareServer.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPConduitTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/PublishedEndpointUrlTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/Server.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/SessionServer.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/WSDLAddressRewriteTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/WSDLQueryTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/auth/DigestAuthTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/auth/DigestServer.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/GreeterImpl.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/JettyBasicAuthServer.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/JettyBasicAuthTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jetty-engine.xml
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/server-lifecycle-beans.xml
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/server.xml
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/local_transport/Server.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/multitransport/MultiTransportClientServerTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/AbstractServletTest.java
    cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java
    cxf/trunk/testutils/src/main/java/org/apache/hello_world_doc_lit/MultiTransportGreeter.java

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/BareServer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/BareServer.java?rev=1304006&r1=1304005&r2=1304006&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/BareServer.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/BareServer.java Thu Mar 22 19:37:17 2012
@@ -26,15 +26,22 @@ import org.apache.cxf.bus.spring.SpringB
 import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
 
 public class BareServer extends AbstractBusTestServerBase {
-    public static final String PORT = allocatePort(BareServer.class); 
+    public static final String PORT = allocatePort(BareServer.class);
+    
+    Endpoint ep;
+    
     @Override
     protected void run() {
         Bus bus = new SpringBusFactory().createBus();
         SpringBusFactory.setDefaultBus(bus);
         Object implementor = new GreeterImpl();
         String address = "http://localhost:" + PORT + "/SoapContext/GreeterPort";
-        Endpoint.publish(address, implementor);
-        
+        ep = Endpoint.publish(address, implementor);
+    }
+    @Override
+    public void tearDown() {
+        ep.stop();
+        ep = null;
     }
     
     public static void main(String[] args) {

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java?rev=1304006&r1=1304005&r2=1304006&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/ClientServerSessionTest.java Thu Mar 22 19:37:17 2012
@@ -43,7 +43,7 @@ public class ClientServerSessionTest ext
     public static void startServers() throws Exception {
         
         assertTrue("server did not launch correctly",
-                       launchServer(SessionServer.class));
+                       launchServer(SessionServer.class, true));
         
     }
     

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=1304006&r1=1304005&r2=1304006&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 Mar 22 19:37:17 2012
@@ -69,7 +69,6 @@ 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.Test;
 
 import org.springframework.context.ApplicationContext;
@@ -213,13 +212,6 @@ public class HTTPConduitTest extends Abs
         }
         return server;
     }
-    
-    @BeforeClass
-    public static void setProps() {
-        // TODO: Do I need this?
-        System.setProperty("org.apache.cxf.bus.factory", 
-            "org.apache.cxf.bus.CXFBusFactory");
-    }
 
     public static KeyStore getKeyStore(String ksType, String file, String ksPassword)
         throws GeneralSecurityException,

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/PublishedEndpointUrlTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/PublishedEndpointUrlTest.java?rev=1304006&r1=1304005&r2=1304006&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/PublishedEndpointUrlTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/PublishedEndpointUrlTest.java Thu Mar 22 19:37:17 2012
@@ -32,6 +32,9 @@ import javax.wsdl.factory.WSDLFactory;
 import javax.wsdl.xml.WSDLReader;
 
 import junit.framework.Assert;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
 import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
@@ -43,13 +46,15 @@ import org.junit.Test;
 public class PublishedEndpointUrlTest extends Assert {
     public static final String PORT = TestUtil.getPortNumber(PublishedEndpointUrlTest.class);
 
+    
     @Test
     public void testPublishedEndpointUrl() throws Exception {
         
         Greeter implementor = new org.apache.hello_world_soap_http.GreeterImpl();
         String publishedEndpointUrl = "http://cxf.apache.org/publishedEndpointUrl";
-        
+        Bus bus = BusFactory.getDefaultBus();
         JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
+        svrFactory.setBus(bus);
         svrFactory.setServiceClass(Greeter.class);
         svrFactory.setAddress("http://localhost:" + PORT + "/publishedEndpointUrl");
         svrFactory.setPublishedEndpointUrl(publishedEndpointUrl);
@@ -87,8 +92,9 @@ public class PublishedEndpointUrlTest ex
                 }
             }
         }
-        
+        server.stop();
         server.destroy();
+        bus.shutdown(true);
     }
 
 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/Server.java?rev=1304006&r1=1304005&r2=1304006&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/Server.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/Server.java Thu Mar 22 19:37:17 2012
@@ -33,6 +33,7 @@ public class Server extends AbstractBusT
     private String name;
     private String address;
     private URL configFileURL;
+    private EndpointImpl ep;
     
     public Server(String[] args) throws Exception {
         this(args[0], args[1], args[2]);
@@ -47,6 +48,12 @@ public class Server extends AbstractBusT
         //                     + " with config " + configFileURL);
 
     }
+    public void tearDown() throws Exception {
+        if (ep != null) {
+            ep.stop();
+            ep = null;
+        }
+    }
 
     protected void run()  {
         // We use a null binding id in the call to EndpointImpl
@@ -66,7 +73,7 @@ public class Server extends AbstractBusT
         Object implementor = new GreeterImpl(name);
         
         // I don't know why this works.
-        EndpointImpl ep = 
+        ep = 
             new EndpointImpl(
                     getBus(), 
                     implementor,

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/SessionServer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/SessionServer.java?rev=1304006&r1=1304005&r2=1304006&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/SessionServer.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/SessionServer.java Thu Mar 22 19:37:17 2012
@@ -27,17 +27,23 @@ import org.apache.cxf.testutil.common.Ab
 
 public class SessionServer extends AbstractBusTestServerBase {
     public static final String PORT = allocatePort(SessionServer.class);
-
+    Bus bus;
+    
     @Override
     protected void run() {
         String configurationFile = "resources/SessionServer.xml";
         URL configure =
             SessionServer.class.getResource(configurationFile);
-        System.out.println("the configure is " + configure);
-        Bus bus = new SpringBusFactory().createBus(configure, true);
+        bus = new SpringBusFactory().createBus(configure, true);
         SpringBusFactory.setDefaultBus(bus);
     }
     
+    @Override
+    public void tearDown() {
+        bus.shutdown(true);
+        bus = null;
+    }
+    
     public static void main(String[] args) {
         try {
             System.out.println("!!!!start");

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/WSDLAddressRewriteTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/WSDLAddressRewriteTest.java?rev=1304006&r1=1304005&r2=1304006&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/WSDLAddressRewriteTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/WSDLAddressRewriteTest.java Thu Mar 22 19:37:17 2012
@@ -31,10 +31,18 @@ import org.apache.cxf.jaxws.EndpointImpl
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
 
+import org.junit.Before;
 import org.junit.Test;
 
 public class WSDLAddressRewriteTest extends AbstractBusClientServerTestBase {
     public static final String PORT = allocatePort(WSDLAddressRewriteTest.class);
+    
+    @Before
+    public void setupBus() throws Exception {
+        createStaticBus();
+    }
+
+    
     @Test
     public void testWithSameAddress() throws Exception {
         Endpoint endpoint = null;

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/WSDLQueryTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/WSDLQueryTest.java?rev=1304006&r1=1304005&r2=1304006&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/WSDLQueryTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/WSDLQueryTest.java Thu Mar 22 19:37:17 2012
@@ -34,7 +34,7 @@ public class WSDLQueryTest extends Abstr
     @BeforeClass
     public static void startServers() throws Exception {
         assertTrue("server did not launch correctly",
-                   launchServer(BareServer.class));
+                   launchServer(BareServer.class, true));
     }
     
     @Test

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/auth/DigestAuthTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/auth/DigestAuthTest.java?rev=1304006&r1=1304005&r2=1304006&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/auth/DigestAuthTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/auth/DigestAuthTest.java Thu Mar 22 19:37:17 2012
@@ -50,7 +50,7 @@ public class DigestAuthTest extends Abst
     
     @BeforeClass
     public static void startServer() {
-        launchServer(DigestServer.class);
+        launchServer(DigestServer.class, true);
     }
 
     @Test    

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/auth/DigestServer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/auth/DigestServer.java?rev=1304006&r1=1304005&r2=1304006&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/auth/DigestServer.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/auth/DigestServer.java Thu Mar 22 19:37:17 2012
@@ -48,7 +48,7 @@ public class DigestServer extends Abstra
     }
     
     protected void run() {
-        System.out.println("Starting Server");
+        //System.out.println("Starting Server");
 
         server = new org.eclipse.jetty.server.Server();
 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java?rev=1304006&r1=1304005&r2=1304006&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/EngineLifecycleTest.java Thu Mar 22 19:37:17 2012
@@ -77,7 +77,8 @@ public class EngineLifecycleTest extends
     @Before 
     public void setSystemProperties() {
         close = System.getProperty("org.apache.cxf.transports.http_jetty.DontClosePort");        
-        System.setProperty("org.apache.cxf.transports.http_jetty.DontClosePort", "false");
+        //System.setProperty("org.apache.cxf.transports.http_jetty.DontClosePort", "false");
+        System.clearProperty("org.apache.cxf.transports.http_jetty.DontClosePort");
         
     }
     
@@ -85,6 +86,8 @@ public class EngineLifecycleTest extends
     public void resetSystemProperties() {
         if (close != null) {
             System.setProperty("org.apache.cxf.transports.http_jetty.DontClosePort", close);
+        } else {
+            System.clearProperty("org.apache.cxf.transports.http_jetty.DontClosePort");
         }
     }
     
@@ -166,11 +169,8 @@ public class EngineLifecycleTest extends
     }
 
     public void shutdownService() throws Exception {   
-        Bus bus = (Bus)applicationContext.getBean("cxf");
-        bus.shutdown(true);
         applicationContext.destroy();
         applicationContext.close();
-                
     }
     
     
@@ -201,7 +201,6 @@ public class EngineLifecycleTest extends
         verifyNoServer(PORT2);
         verifyNoServer(PORT1);
     }
-    
         
     private void verifyNoServer(String port) {
         try {
@@ -229,12 +228,15 @@ public class EngineLifecycleTest extends
         invokeService();    
         invokeService8801();
         shutdownService();
+        System.gc(); //make sure the port is cleaned up a bit
+        Thread.sleep(100);
+        System.gc(); 
         verifyNoServer(PORT2);
         verifyNoServer(PORT1);
         
         
         setUpBus(true);
-       
+        Thread.sleep(100);       
         invokeService();            
         invokeService8801();
         getTestHtml();

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/GreeterImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/GreeterImpl.java?rev=1304006&r1=1304005&r2=1304006&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/GreeterImpl.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/GreeterImpl.java Thu Mar 22 19:37:17 2012
@@ -19,7 +19,6 @@
 
 package org.apache.cxf.systest.http_jetty;
 
-import java.util.Date;
 import java.util.concurrent.Future;
 
 import javax.jws.WebService;
@@ -50,9 +49,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 java.util.Date().toString()
+        //                   + "***\n\n");
         if (delay > 0) {
             try {
                 Thread.sleep(delay);

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/JettyBasicAuthServer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/JettyBasicAuthServer.java?rev=1304006&r1=1304005&r2=1304006&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/JettyBasicAuthServer.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/JettyBasicAuthServer.java Thu Mar 22 19:37:17 2012
@@ -35,6 +35,8 @@ public class JettyBasicAuthServer extend
     static final String PORT = allocatePort(JettyBasicAuthServer.class);
     static final String ADDRESS = "http://localhost:" + PORT + "/SoapContext/SoapPort";
 
+    Endpoint ep;
+    
     protected void run()  {
         String configurationFile = "jettyBasicAuthServer.xml";
         URL configure =
@@ -46,9 +48,16 @@ public class JettyBasicAuthServer extend
         setBus(bus);
 
         GreeterImpl implementor = new GreeterImpl();
-        Endpoint.publish(ADDRESS, implementor);
+        ep = Endpoint.publish(ADDRESS, implementor);
     }
-        
+    
+    public void tearDown() throws Exception {
+        if (ep != null) {
+            ep.stop();
+            ep = null;
+        }
+    }
+    
     public static void main(String[] args) {
         try { 
             JettyBasicAuthServer s = new JettyBasicAuthServer(); 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/JettyBasicAuthTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/JettyBasicAuthTest.java?rev=1304006&r1=1304005&r2=1304006&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/JettyBasicAuthTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/JettyBasicAuthTest.java Thu Mar 22 19:37:17 2012
@@ -48,7 +48,7 @@ public class JettyBasicAuthTest extends 
     @BeforeClass
     public static void startServers() throws Exception {
         assertTrue("server did not launch correctly", 
-                   launchServer(JettyBasicAuthServer.class, false));
+                   launchServer(JettyBasicAuthServer.class, true));
     }
 
     @Before

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jetty-engine.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jetty-engine.xml?rev=1304006&r1=1304005&r2=1304006&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jetty-engine.xml (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/jetty-engine.xml Thu Mar 22 19:37:17 2012
@@ -35,13 +35,6 @@
  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
               
  <httpj:engine-factory bus="cxf">
-  <httpj:engine port='${testutil.ports.EngineLifecycleTest.1}'>
-   <httpj:connector>
-    <bean class="org.eclipse.jetty.server.bio.SocketConnector">
-     <property name="port" value="${testutil.ports.EngineLifecycleTest.1}"/>
-    </bean>
-   </httpj:connector>
-  </httpj:engine>
   <httpj:engine port="${testutil.ports.EngineLifecycleTest.2}">
    <httpj:handlers>
     <bean class="org.eclipse.jetty.webapp.WebAppContext">

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/server-lifecycle-beans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/server-lifecycle-beans.xml?rev=1304006&r1=1304005&r2=1304006&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/server-lifecycle-beans.xml (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/server-lifecycle-beans.xml Thu Mar 22 19:37:17 2012
@@ -1,79 +1,79 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!--
-  Licensed to the Apache Software Foundation (ASF) under one
-  or more contributor license agreements. See the NOTICE file
-  distributed with this work for additional information
-  regarding copyright ownership. The ASF licenses this file
-  to you under the Apache License, Version 2.0 (the
-  "License"); you may not use this file except in compliance
-  with the License. You may obtain a copy of the License at
-
-  http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing,
-  software distributed under the License is distributed on an
-  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-  KIND, either express or implied. See the License for the
-  specific language governing permissions and limitations
-  under the License.
--->
-
-<beans xmlns="http://www.springframework.org/schema/beans" 
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xmlns:http="http://cxf.apache.org/transports/http/configuration"
-  xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration" 
-  xmlns:jaxws="http://cxf.apache.org/jaxws"
- xsi:schemaLocation="
+<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor 
+	license agreements. See the NOTICE file distributed with this work for additional 
+	information regarding copyright ownership. The ASF licenses this file to 
+	you under the Apache License, Version 2.0 (the "License"); you may not use 
+	this file except in compliance with the License. You may obtain a copy of 
+	the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required 
+	by applicable law or agreed to in writing, software distributed under the 
+	License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS 
+	OF ANY KIND, either express or implied. See the License for the specific 
+	language governing permissions and limitations under the License. -->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:http="http://cxf.apache.org/transports/http/configuration"
+	xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
+	xmlns:jaxws="http://cxf.apache.org/jaxws"
+	xsi:schemaLocation="
         http://www.springframework.org/schema/beans                 http://www.springframework.org/schema/beans/spring-beans.xsd
         http://cxf.apache.org/jaxws                                 http://cxf.apache.org/schemas/jaxws.xsd
         http://cxf.apache.org/transports/http/configuration         http://cxf.apache.org/schemas/configuration/http-conf.xsd
         http://cxf.apache.org/transports/http-jetty/configuration   http://cxf.apache.org/schemas/configuration/http-jetty.xsd
  ">
-   <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+	<bean
+		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
 
-  <bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding" scope='prototype'>
-  <property name='configuration'>
-   <bean class='org.apache.cxf.aegis.type.Configuration'>
-    <property name='defaultMinOccurs' value='1' />
-    <property name='defaultNillable' value='false' />
-   </bean>
-  </property>
- </bean>
-
- <!--  define a service factory that supports both JAX-WS annotations and also Aegis files. -->
- <bean id='jaxws-and-aegis-service-factory' class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"
-       scope='prototype'>
-  <property name="dataBinding" ref="aegisBean" />
- </bean>
-
- <jaxws:endpoint id="dummy-service-endpoint" 
-    implementor="org.apache.cxf.systest.http_jetty.Dummy" 
-    address="http://localhost:${testutil.ports.EngineLifecycleTest.2}/Dummy">
-  <jaxws:serviceFactory>
-   <ref bean='jaxws-and-aegis-service-factory' />
-  </jaxws:serviceFactory>
- </jaxws:endpoint>
-
- <jaxws:endpoint id="dummy-8801-service-endpoint"  
-                 implementor="org.apache.cxf.systest.http_jetty.Dummy" 
-                 address="http://localhost:${testutil.ports.EngineLifecycleTest.1}/Dummy">
-  <jaxws:serviceFactory>
-   <ref bean='jaxws-and-aegis-service-factory' />
-  </jaxws:serviceFactory>
- </jaxws:endpoint>
-
- <bean id="dummy-client" class="org.apache.cxf.systest.http_jetty.DummyInterface" factory-bean="clientFactory" factory-method="create" />
-
- <bean id="clientFactory" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
-  <property name="serviceClass" value="org.apache.cxf.systest.http_jetty.DummyInterface" />
-  <property name="address" value="http://localhost:${testutil.ports.EngineLifecycleTest.2}/Dummy" />
- </bean>
-
-<bean id="dummy-client-8801" class="org.apache.cxf.systest.http_jetty.DummyInterface" factory-bean="clientFactory-8801" factory-method="create" />
-
- <bean id="clientFactory-8801" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
-  <property name="serviceClass" value="org.apache.cxf.systest.http_jetty.DummyInterface" />
-  <property name="address" value="http://localhost:${testutil.ports.EngineLifecycleTest.1}/Dummy" />
- </bean>
+	<bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding"
+		scope='prototype'>
+		<property name='configuration'>
+			<bean class='org.apache.cxf.aegis.type.Configuration'>
+				<property name='defaultMinOccurs' value='1' />
+				<property name='defaultNillable' value='false' />
+			</bean>
+		</property>
+	</bean>
+
+	<!-- define a service factory that supports both JAX-WS annotations and 
+		also Aegis files. -->
+	<bean id='jaxws-and-aegis-service-factory' class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"
+		scope='prototype'>
+		<property name="dataBinding" ref="aegisBean" />
+	</bean>
+
+	<jaxws:endpoint id="dummy-service-endpoint"
+		implementor="org.apache.cxf.systest.http_jetty.Dummy"
+		address="http://localhost:${testutil.ports.EngineLifecycleTest.2}/Dummy">
+		<jaxws:serviceFactory>
+			<ref bean='jaxws-and-aegis-service-factory' />
+		</jaxws:serviceFactory>
+	</jaxws:endpoint>
+
+	<jaxws:endpoint id="dummy-8801-service-endpoint"
+		implementor="org.apache.cxf.systest.http_jetty.Dummy"
+		address="http://localhost:${testutil.ports.EngineLifecycleTest.1}/Dummy">
+		<jaxws:serviceFactory>
+			<ref bean='jaxws-and-aegis-service-factory' />
+		</jaxws:serviceFactory>
+	</jaxws:endpoint>
+
+	<bean id="dummy-client" class="org.apache.cxf.systest.http_jetty.DummyInterface"
+		factory-bean="clientFactory" factory-method="create" />
+
+	<bean id="clientFactory" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
+		<property name="serviceClass"
+			value="org.apache.cxf.systest.http_jetty.DummyInterface" />
+		<property name="address"
+			value="http://localhost:${testutil.ports.EngineLifecycleTest.2}/Dummy" />
+	</bean>
+
+	<bean id="dummy-client-8801" class="org.apache.cxf.systest.http_jetty.DummyInterface"
+		factory-bean="clientFactory-8801" factory-method="create" />
+
+	<bean id="clientFactory-8801" class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
+		<property name="serviceClass"
+			value="org.apache.cxf.systest.http_jetty.DummyInterface" />
+		<property name="address"
+			value="http://localhost:${testutil.ports.EngineLifecycleTest.1}/Dummy" />
+	</bean>
 
 </beans>

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/server.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/server.xml?rev=1304006&r1=1304005&r2=1304006&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/server.xml (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/server.xml Thu Mar 22 19:37:17 2012
@@ -23,10 +23,14 @@
        xsi:schemaLocation="
 http://cxf.apache.org/transports/http-jetty/configuration http://cxf.apache.org/schemas/configuration/http-jetty.xsd
 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+
+  	<bean
+		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
   
     <http-jetty:engine-factory bus="cxf">
-        <http-jetty:engine port="0">
-	       <http-jetty:threadingParameters minThreads="1" maxThreads="3"/>   
+        <http-jetty:engine port="${testutil.ports.org.apache.cxf.systest.http_jetty.Server}">
+	       <http-jetty:threadingParameters minThreads="3" maxThreads="${ThreadPoolTest.threads}"/>   
         </http-jetty:engine>
     </http-jetty:engine-factory>
 

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/local_transport/Server.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/local_transport/Server.java?rev=1304006&r1=1304005&r2=1304006&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/local_transport/Server.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/local_transport/Server.java Thu Mar 22 19:37:17 2012
@@ -28,10 +28,18 @@ import org.apache.hello_world_soap_http.
 
 public class Server extends AbstractBusTestServerBase {
 
+    Endpoint ep;
     protected void run() {        
         Object implementor = new GreeterImpl();
         String address = "local://Greeter";
-        Endpoint.publish(address, implementor);
+        ep = Endpoint.publish(address, implementor);
+    }
+    @Override
+    public void tearDown() {
+        if (ep != null) {
+            ep.stop();
+        }
+        
     }
     
     

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/multitransport/MultiTransportClientServerTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/multitransport/MultiTransportClientServerTest.java?rev=1304006&r1=1304005&r2=1304006&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/multitransport/MultiTransportClientServerTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/multitransport/MultiTransportClientServerTest.java Thu Mar 22 19:37:17 2012
@@ -51,14 +51,24 @@ public class MultiTransportClientServerT
 
     public static class MyServer extends AbstractBusTestServerBase {
         Definition def;
+        Endpoint ep1;
+        Endpoint ep2;
         protected void run() {
             Object implementor = new HTTPGreeterImpl();
             String address = "http://localhost:" + PORT + "/SOAPDocLitService/SoapPort";
-            Endpoint.publish(address, implementor);
+            ep1 = Endpoint.publish(address, implementor);
             EmbeddedJMSBrokerLauncher.updateWsdlExtensors(getBus(),
                                                           "testutils/hello_world_doc_lit.wsdl");
             implementor = new JMSGreeterImpl();
-            Endpoint.publish(null, implementor);
+            ep2 = Endpoint.publish(null, implementor);
+        }
+        public void tearDown() {
+            if (ep1 != null) {
+                ep1.stop();
+            }
+            if (ep2 != null) {
+                ep2.stop();
+            }
         }
 
         public static void main(String[] args) {
@@ -81,13 +91,13 @@ public class MultiTransportClientServerT
             props.put("org.apache.activemq.default.directory.prefix", 
                       System.getProperty("org.apache.activemq.default.directory.prefix"));
         }
-        props.put("java.util.logging.config.file", 
-                  System.getProperty("java.util.logging.config.file"));
+        //props.put("java.util.logging.config.file", 
+        //          System.getProperty("java.util.logging.config.file"));
         
         assertTrue("server did not launch correctly", 
                    launchServer(EmbeddedJMSBrokerLauncher.class, props, null));
 
-        assertTrue("server did not launch correctly", launchServer(MyServer.class));
+        assertTrue("server did not launch correctly", launchServer(MyServer.class, true));
         
     }
     

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/AbstractServletTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/AbstractServletTest.java?rev=1304006&r1=1304005&r2=1304006&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/AbstractServletTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/AbstractServletTest.java Thu Mar 22 19:37:17 2012
@@ -32,6 +32,8 @@ import com.meterware.servletunit.Servlet
 import com.meterware.servletunit.ServletUnitClient;
 
 import org.apache.cxf.test.AbstractCXFTest;
+
+import org.junit.After;
 import org.junit.Before;
 
 public abstract class AbstractServletTest extends AbstractCXFTest {
@@ -43,15 +45,20 @@ public abstract class AbstractServletTes
     public void setUp() throws Exception {
         InputStream configurationStream = getResourceAsStream(getConfiguration());
         sr = new ServletRunner(configurationStream, CONTEXT);
-        
         try {
             sr.newClient().getResponse(CONTEXT_URL + "/services");
         } catch (HttpNotFoundException e) {
             // ignore, we just want to boot up the servlet
         }   
         
-        HttpUnitOptions.setExceptionsThrownOnErrorStatus(true);        
+        HttpUnitOptions.setExceptionsThrownOnErrorStatus(true);
     } 
+    @After
+    public void tearDown() throws Exception {
+        if (sr != null) {
+            sr.shutDown();
+        }
+    }
 
     /**
      * @return The web.xml to use for testing.

Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java?rev=1304006&r1=1304005&r2=1304006&view=diff
==============================================================================
--- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java (original)
+++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/CXFServletTest.java Thu Mar 22 19:37:17 2012
@@ -24,6 +24,7 @@ import java.util.Set;
 
 import javax.jws.WebService;
 import javax.xml.ws.Endpoint;
+import javax.xml.ws.soap.SOAPBinding;
 
 import org.w3c.dom.Document;
 
@@ -272,7 +273,7 @@ public class CXFServletTest extends Abst
     @Test
     public void testGetBinding() throws Exception {
         Endpoint ep = Endpoint.create("http://schemas.xmlsoap.org/wsdl/soap/http", new HelloImpl());
-        System.out.println(ep.getBinding().getClass());
+        assertTrue(ep.getBinding() instanceof SOAPBinding);
     }
 
     @WebService(name = "Hello", portName = "HelloPort",

Modified: cxf/trunk/testutils/src/main/java/org/apache/hello_world_doc_lit/MultiTransportGreeter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/testutils/src/main/java/org/apache/hello_world_doc_lit/MultiTransportGreeter.java?rev=1304006&r1=1304005&r2=1304006&view=diff
==============================================================================
--- cxf/trunk/testutils/src/main/java/org/apache/hello_world_doc_lit/MultiTransportGreeter.java (original)
+++ cxf/trunk/testutils/src/main/java/org/apache/hello_world_doc_lit/MultiTransportGreeter.java Thu Mar 22 19:37:17 2012
@@ -25,17 +25,17 @@ import org.apache.hello_world_doc_lit.ty
 public class MultiTransportGreeter implements Greeter {
 
     public String sayHi() {
-        System.out.println("Call sayHi here ");
+        //System.out.println("Call sayHi here ");
         return "Bonjour";
     }
 
     public String greetMe(String requestType) {
-        System.out.println("Reached here :" + requestType);
+        //System.out.println("Reached here :" + requestType);
         return "Hello " + requestType;
     }
 
     public void greetMeOneWay(String requestType) {
-        System.out.println("*********  greetMeOneWay: " + requestType);        
+        //System.out.println("*********  greetMeOneWay: " + requestType);        
     }
 
     public void pingMe() throws PingMeFault {