Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 40070 invoked from network); 7 Jun 2010 21:08:35 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Jun 2010 21:08:35 -0000 Received: (qmail 31034 invoked by uid 500); 7 Jun 2010 21:08:35 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 30950 invoked by uid 500); 7 Jun 2010 21:08:34 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 30943 invoked by uid 99); 7 Jun 2010 21:08:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jun 2010 21:08:34 +0000 X-ASF-Spam-Status: No, hits=-1336.7 required=10.0 tests=ALL_TRUSTED,AWL X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Jun 2010 21:08:30 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 4263323889E5; Mon, 7 Jun 2010 21:08:10 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r952435 - in /cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest: http/ http/resources/ http_jetty/ http_jetty/continuations/ servlet/ Date: Mon, 07 Jun 2010 21:08:09 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100607210810.4263323889E5@eris.apache.org> Author: dkulp Date: Mon Jun 7 21:08:08 2010 New Revision: 952435 URL: http://svn.apache.org/viewvc?rev=952435&view=rev Log: Update all the transport systest to use dynamic ports 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/BusServer.java cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/CertConstraintsTest.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/HTTPSClientTest.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/resources/Abost.cxf cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Bethal.cxf cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/BethalClientBeans.xml cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/BethalClientConfig.cxf cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Gordy.cxf cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Http2HttpLoopRedirectFail.cxf cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Hurlon.cxf cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Morpit.cxf cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Poltim.cxf cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Rethwel.cxf cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer_Windows.xml cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Tarpin.cxf cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/jaxws-publish.xml cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/jaxws-server-constraints.xml cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/jaxws-server.xml cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/pkcs12.xml cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/resource-key-spec-url.xml cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/resource-key-spec.xml 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/Server.java cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/ThreadPoolTest.java cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http_jetty/continuations/ClientServerWrappedContinuationTest.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/servlet/NoSpringServletClientTest.java cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletServer.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=952435&r1=952434&r2=952435&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 Mon Jun 7 21:08:08 2010 @@ -26,13 +26,13 @@ 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); @Override protected void run() { Bus bus = new SpringBusFactory().createBus(); SpringBusFactory.setDefaultBus(bus); Object implementor = new GreeterImpl(); - String address = "http://localhost:9020/SoapContext/GreeterPort"; + String address = "http://localhost:" + PORT + "/SoapContext/GreeterPort"; Endpoint.publish(address, implementor); } Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/BusServer.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/BusServer.java?rev=952435&r1=952434&r2=952435&view=diff ============================================================================== --- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/BusServer.java (original) +++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/BusServer.java Mon Jun 7 21:08:08 2010 @@ -28,7 +28,16 @@ import org.apache.cxf.testutil.common.Ab * Everything else is designed to be spring-loaded. */ public class BusServer extends AbstractBusTestServerBase { - + public static final String PORT0 = allocatePort(BusServer.class, 0); + public static final String PORT1 = allocatePort(BusServer.class, 1); + public static final String PORT2 = allocatePort(BusServer.class, 2); + public static final String PORT3 = allocatePort(BusServer.class, 3); + public static final String PORT4 = allocatePort(BusServer.class, 4); + public static final String PORT5 = allocatePort(BusServer.class, 5); + public static final String PORT6 = allocatePort(BusServer.class, 6); + public static final String PORT7 = allocatePort(BusServer.class, 7); + public static final String PORT8 = allocatePort(BusServer.class, 8); + protected void run() { // // Just instantiate the Bus; services will be instantiated Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/CertConstraintsTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/CertConstraintsTest.java?rev=952435&r1=952434&r2=952435&view=diff ============================================================================== --- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/CertConstraintsTest.java (original) +++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/CertConstraintsTest.java Mon Jun 7 21:08:08 2010 @@ -36,7 +36,15 @@ import org.junit.Test; * constraints logic. */ public class CertConstraintsTest extends AbstractBusClientServerTestBase { - + public static final String PORT0 = BusServer.PORT0; + public static final String PORT1 = BusServer.PORT1; + public static final String PORT2 = BusServer.PORT2; + public static final String PORT3 = BusServer.PORT3; + public static final String PORT4 = BusServer.PORT4; + public static final String PORT5 = BusServer.PORT5; + public static final String PORT6 = BusServer.PORT6; + public static final String PORT7 = BusServer.PORT7; + public static final String PORT8 = BusServer.PORT8; // // data // @@ -122,35 +130,35 @@ public class CertConstraintsTest extends // // Good Subject DN // - testSuccessfulCall("https://localhost:9006/SoapContext/HttpsPort"); + testSuccessfulCall("https://localhost:" + PORT0 + "/SoapContext/HttpsPort"); // // Bad Subject DN // - testFailedCall("https://localhost:9007/SoapContext/HttpsPort"); + testFailedCall("https://localhost:" + PORT1 + "/SoapContext/HttpsPort"); // // Mixed Subject DN (ALL) // - testFailedCall("https://localhost:9008/SoapContext/HttpsPort"); + testFailedCall("https://localhost:" + PORT2 + "/SoapContext/HttpsPort"); // // Mixed Subject DN (ANY) // - testSuccessfulCall("https://localhost:9009/SoapContext/HttpsPort"); + testSuccessfulCall("https://localhost:" + PORT3 + "/SoapContext/HttpsPort"); // // Mixed Issuer DN (ALL) // - testFailedCall("https://localhost:9010/SoapContext/HttpsPort"); + testFailedCall("https://localhost:" + PORT4 + "/SoapContext/HttpsPort"); // // Mixed Issuer DN (ANY) // - testSuccessfulCall("https://localhost:9011/SoapContext/HttpsPort"); + testSuccessfulCall("https://localhost:" + PORT5 + "/SoapContext/HttpsPort"); // // Bad server Subject DN // - testFailedCall("https://localhost:9012/SoapContext/HttpsPort"); + testFailedCall("https://localhost:" + PORT6 + "/SoapContext/HttpsPort"); // // Bad server Issuer DN // - testFailedCall("https://localhost:9013/SoapContext/HttpsPort"); + testFailedCall("https://localhost:" + PORT7 + "/SoapContext/HttpsPort"); stopServers(); } 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=952435&r1=952434&r2=952435&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 Mon Jun 7 21:08:08 2010 @@ -38,6 +38,7 @@ import org.junit.Ignore; import org.junit.Test; public class ClientServerSessionTest extends AbstractBusClientServerTestBase { + public static final String PORT = SessionServer.PORT; @BeforeClass public static void startServers() throws Exception { @@ -57,6 +58,7 @@ public class ClientServerSessionTest ext Greeter greeter = service.getGreeterPort(); BindingProvider bp = (BindingProvider)greeter; + updateAddressPort(bp, PORT); bp.getRequestContext().put(BindingProvider.SESSION_MAINTAIN_PROPERTY, true); @@ -118,6 +120,7 @@ public class ClientServerSessionTest ext try { Greeter greeter = service.getGreeterPort(); + updateAddressPort(greeter, PORT); String greeting = greeter.greetMe("Bonjour"); @@ -145,7 +148,7 @@ public class ClientServerSessionTest ext boolean isWindows = System.getProperty("os.name").startsWith("Windows"); GreeterSessionImpl implementor = new GreeterSessionImpl(); - String address = "http://localhost:9020/SoapContext/GreeterPort"; + String address = "http://localhost:" + PORT + "/SoapContext/GreeterPort"; try { Endpoint.publish(address, implementor); if (!isWindows) { 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=952435&r1=952434&r2=952435&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 Mon Jun 7 21:08:08 2010 @@ -102,6 +102,15 @@ import org.springframework.context.Appli * the Hostname Verifier. */ public class HTTPConduitTest extends AbstractBusClientServerTestBase { + public static final String PORT0 = BusServer.PORT0; + public static final String PORT1 = BusServer.PORT1; + public static final String PORT2 = BusServer.PORT2; + public static final String PORT3 = BusServer.PORT3; + public static final String PORT4 = BusServer.PORT4; + public static final String PORT5 = BusServer.PORT5; + public static final String PORT6 = BusServer.PORT6; + public static final String PORT7 = BusServer.PORT7; + public static final String PORT8 = BusServer.PORT8; private static final boolean IN_PROCESS = true; @@ -110,15 +119,15 @@ public class HTTPConduitTest extends Abs private static List servers = new ArrayList(); static { - addrMap.put("Mortimer", "http://localhost:9000/"); - addrMap.put("Tarpin", "https://localhost:9003/"); - addrMap.put("Rethwel", "http://localhost:9004/"); - addrMap.put("Poltim", "https://localhost:9005/"); - addrMap.put("Gordy", "https://localhost:9001/"); - addrMap.put("Bethal", "https://localhost:9002/"); - addrMap.put("Abost", "http://localhost:9007/"); - addrMap.put("Hurlon", "http://localhost:9006/"); - addrMap.put("Morpit", "https://localhost:9008/"); + addrMap.put("Mortimer", "http://localhost:" + PORT0 + "/"); + addrMap.put("Tarpin", "https://localhost:" + PORT3 + "/"); + addrMap.put("Rethwel", "http://localhost:" + PORT4 + "/"); + addrMap.put("Poltim", "https://localhost:" + PORT5 + "/"); + addrMap.put("Gordy", "https://localhost:" + PORT1 + "/"); + addrMap.put("Bethal", "https://localhost:" + PORT2 + "/"); + addrMap.put("Abost", "http://localhost:" + PORT7 + "/"); + addrMap.put("Hurlon", "http://localhost:" + PORT6 + "/"); + addrMap.put("Morpit", "https://localhost:" + PORT8 + "/"); tlsClientParameters.setDisableCNCheck(true); } @@ -270,7 +279,8 @@ public class HTTPConduitTest extends Abs Greeter mortimer = service.getPort(mortimerQ, Greeter.class); assertNotNull("Port is null", mortimer); - + updateAddressPort(mortimer, PORT0); + String answer = mortimer.sayHi(); assertTrue("Unexpected answer: " + answer, "Bonjour from Mortimer".equals(answer)); @@ -299,7 +309,8 @@ public class HTTPConduitTest extends Abs Greeter rethwel = service.getPort(rethwelQ, Greeter.class); assertNotNull("Port is null", rethwel); - + updateAddressPort(rethwel, PORT5); + String answer = null; try { answer = rethwel.sayHi(); @@ -346,6 +357,7 @@ public class HTTPConduitTest extends Abs assertNotNull("Service is null", service); Greeter rethwel = service.getPort(rethwelQ, Greeter.class); + updateAddressPort(rethwel, PORT4); assertNotNull("Port is null", rethwel); String answer = rethwel.sayHi(); @@ -379,6 +391,7 @@ public class HTTPConduitTest extends Abs Greeter hurlon = service.getPort(hurlonQ, Greeter.class); assertNotNull("Port is null", hurlon); + updateAddressPort(hurlon, PORT6); String answer = null; try { @@ -413,6 +426,7 @@ public class HTTPConduitTest extends Abs Greeter bethal = service.getPort(bethalQ, Greeter.class); assertNotNull("Port is null", bethal); + updateAddressPort(bethal, PORT2); verifyBethalClient(bethal); } @@ -428,6 +442,7 @@ public class HTTPConduitTest extends Abs ApplicationContext context = bus.getExtension(BusApplicationContext.class); Greeter bethal = (Greeter)context.getBean("Bethal"); + updateAddressPort(bethal, PORT2); // verify the client side's setting verifyBethalClient(bethal); } @@ -477,6 +492,7 @@ public class HTTPConduitTest extends Abs Greeter bethal = service.getPort(bethalQ, Greeter.class); assertNotNull("Port is null", bethal); + updateAddressPort(bethal, PORT2); // Okay, I'm sick of configuration files. // This also tests dynamic configuration of the conduit. @@ -517,7 +533,8 @@ public class HTTPConduitTest extends Abs Greeter poltim = service.getPort(poltimQ, Greeter.class); assertNotNull("Port is null", poltim); - + updateAddressPort(poltim, PORT5); + // Okay, I'm sick of configuration files. // This also tests dynamic configuration of the conduit. Client client = ClientProxy.getClient(poltim); @@ -601,6 +618,7 @@ public class HTTPConduitTest extends Abs Greeter bethal = service.getPort(bethalQ, Greeter.class); assertNotNull("Port is null", bethal); + updateAddressPort(bethal, PORT2); // Okay, I'm sick of configuration files. // This also tests dynamic configuration of the conduit. @@ -657,6 +675,7 @@ public class HTTPConduitTest extends Abs Greeter tarpin = service.getPort(tarpinQ, Greeter.class); assertNotNull("Port is null", tarpin); + updateAddressPort(tarpin, PORT3); // Okay, I'm sick of configuration files. // This also tests dynamic configuration of the conduit. @@ -804,6 +823,7 @@ public class HTTPConduitTest extends Abs Greeter gordy = service.getPort(gordyQ, Greeter.class); assertNotNull("Port is null", gordy); + updateAddressPort(gordy, PORT1); // Okay, I'm sick of configuration files. // This also tests dynamic configuration of the conduit. Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java?rev=952435&r1=952434&r2=952435&view=diff ============================================================================== --- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java (original) +++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/HTTPSClientTest.java Mon Jun 7 21:08:08 2010 @@ -36,7 +36,12 @@ import org.junit.Test; * HTTP/S service. */ public class HTTPSClientTest extends AbstractBusClientServerTestBase { - + public static final String PORT1 = BusServer.PORT1; + public static final String PORT2 = BusServer.PORT2; + public static final String PORT3 = BusServer.PORT3; + public static final String PORT4 = BusServer.PORT4; + public static final String PORT5 = BusServer.PORT5; + public static final String PORT6 = BusServer.PORT6; // // data // @@ -106,34 +111,34 @@ public class HTTPSClientTest extends Abs @Test public final void testJaxwsServer() throws Exception { testSuccessfulCall("resources/jaxws-server.xml", - "https://localhost:9002/SoapContext/HttpsPort"); + "https://localhost:" + PORT2 + "/SoapContext/HttpsPort"); } @Test public final void testJaxwsServerChangeHttpsToHttp() throws Exception { testSuccessfulCall("resources/jaxws-server.xml", - "http://localhost:9003/SoapContext/HttpPort"); + "http://localhost:" + PORT3 + "/SoapContext/HttpPort"); } @Test public final void testJaxwsEndpoint() throws Exception { testSuccessfulCall("resources/jaxws-publish.xml", - "https://localhost:9001/SoapContext/HttpsPort"); + "https://localhost:" + PORT1 + "/SoapContext/HttpsPort"); } @Test public final void testPKCS12Endpoint() throws Exception { testSuccessfulCall("resources/pkcs12.xml", - "https://localhost:9006/SoapContext/HttpsPort"); + "https://localhost:" + PORT6 + "/SoapContext/HttpsPort"); } @Test public final void testResourceKeySpecEndpoint() throws Exception { testSuccessfulCall("resources/resource-key-spec.xml", - "https://localhost:9004/SoapContext/HttpsPort"); + "https://localhost:" + PORT4 + "/SoapContext/HttpsPort"); } @Test public final void testResourceKeySpecEndpointURL() throws Exception { testSuccessfulCall("resources/resource-key-spec-url.xml", - "https://localhost:9005/SoapContext/HttpsPort", - new URL("https://localhost:9005/SoapContext/HttpsPort?wsdl")); + "https://localhost:" + PORT5 + "/SoapContext/HttpsPort", + new URL("https://localhost:" + PORT5 + "/SoapContext/HttpsPort?wsdl")); } } 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=952435&r1=952434&r2=952435&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 Mon Jun 7 21:08:08 2010 @@ -35,12 +35,14 @@ import junit.framework.Assert; import org.apache.cxf.endpoint.Server; import org.apache.cxf.helpers.CastUtils; import org.apache.cxf.jaxws.JaxWsServerFactoryBean; +import org.apache.cxf.testutil.common.TestUtil; import org.apache.hello_world_soap_http.Greeter; import org.junit.Test; public class PublishedEndpointUrlTest extends Assert { - + public static final String PORT = TestUtil.getPortNumber(PublishedEndpointUrlTest.class); + @Test public void testPublishedEndpointUrl() throws Exception { @@ -49,7 +51,7 @@ public class PublishedEndpointUrlTest ex JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean(); svrFactory.setServiceClass(Greeter.class); - svrFactory.setAddress("http://localhost:9000/publishedEndpointUrl"); + svrFactory.setAddress("http://localhost:" + PORT + "/publishedEndpointUrl"); svrFactory.setPublishedEndpointUrl(publishedEndpointUrl); svrFactory.setServiceBean(implementor); 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=952435&r1=952434&r2=952435&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 Mon Jun 7 21:08:08 2010 @@ -28,6 +28,7 @@ import org.apache.cxf.jaxws.EndpointImpl import org.apache.cxf.testutil.common.AbstractBusTestServerBase; public class Server extends AbstractBusTestServerBase { + public static final String PORT = allocatePort(Server.class); private String name; private String address; 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=952435&r1=952434&r2=952435&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 Mon Jun 7 21:08:08 2010 @@ -28,6 +28,7 @@ import org.apache.cxf.bus.spring.SpringB import org.apache.cxf.testutil.common.AbstractBusTestServerBase; public class SessionServer extends AbstractBusTestServerBase { + public static final String PORT = allocatePort(SessionServer.class); @Override protected void run() { @@ -43,7 +44,7 @@ public class SessionServer extends Abstr Bus bus = new SpringBusFactory().createBus(configure, true); SpringBusFactory.setDefaultBus(bus); implementor = new GreeterSessionImpl(); - address = "http://localhost:9020/SoapContext/GreeterPort"; + address = "http://localhost:" + PORT + "/SoapContext/GreeterPort"; Endpoint.publish(address, implementor); } 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=952435&r1=952434&r2=952435&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 Mon Jun 7 21:08:08 2010 @@ -34,7 +34,7 @@ import org.apache.cxf.testutil.common.Ab import org.junit.Test; public class WSDLAddressRewriteTest extends AbstractBusClientServerTestBase { - + public static final String PORT = allocatePort(WSDLAddressRewriteTest.class); @Test public void testWithSameAddress() throws Exception { Endpoint endpoint = null; @@ -84,7 +84,7 @@ public class WSDLAddressRewriteTest exte } private String getSoapAddressLine(String address) throws Exception { - Socket s = new Socket(address, 9020); + Socket s = new Socket(address, Integer.parseInt(PORT)); OutputStream os = s.getOutputStream(); os.write("GET /SoapContext/GreeterPort?wsdl HTTP/1.1\r\n".getBytes()); os.write(("Host:" + address + "\r\n\r\n").getBytes()); @@ -105,7 +105,7 @@ public class WSDLAddressRewriteTest exte } private Endpoint publishEndpoint(boolean autoRewriteSoapAddress) { - Endpoint endpoint = Endpoint.publish("http://localhost:9020/SoapContext/GreeterPort", + Endpoint endpoint = Endpoint.publish("http://localhost:" + PORT + "/SoapContext/GreeterPort", new GreeterImpl()); EndpointInfo ei = ((EndpointImpl)endpoint).getServer().getEndpoint().getEndpointInfo(); ei.setProperty("autoRewriteSoapAddress", autoRewriteSoapAddress); 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=952435&r1=952434&r2=952435&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 Mon Jun 7 21:08:08 2010 @@ -30,6 +30,7 @@ import org.junit.BeforeClass; import org.junit.Test; public class WSDLQueryTest extends AbstractBusClientServerTestBase { + public static final String PORT = BareServer.PORT; @BeforeClass public static void startServers() throws Exception { assertTrue("server did not launch correctly", @@ -43,7 +44,7 @@ public class WSDLQueryTest extends Abstr @Test public void testCorrectHostHeader() throws Exception { - sendQuery("localhost:9020", "HTTP/1.1 200 OK"); + sendQuery("localhost:" + PORT, "HTTP/1.1 200 OK"); } @Test @@ -53,7 +54,7 @@ public class WSDLQueryTest extends Abstr @Test public void testBogusHostHeader() throws Exception { - sendQuery("foobar:9020", "HTTP/1.1 200 OK"); + sendQuery("foobar:" + PORT, "HTTP/1.1 200 OK"); } @Test @@ -68,7 +69,7 @@ public class WSDLQueryTest extends Abstr private void sendQuery(String hostHeader, String expectedResponseLine) throws Exception { - Socket s = new Socket("localhost", 9020); + Socket s = new Socket("localhost", Integer.parseInt(PORT)); OutputStream os = s.getOutputStream(); os.write("GET /SoapContext/GreeterPort?wsdl HTTP/1.1\r\n".getBytes()); os.write(("Host:" + hostHeader + "\r\n\r\n").getBytes()); Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Abost.cxf URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Abost.cxf?rev=952435&r1=952434&r2=952435&view=diff ============================================================================== --- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Abost.cxf (original) +++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Abost.cxf Mon Jun 7 21:08:08 2010 @@ -38,9 +38,10 @@ http://cxf.apache.org/schemas/configuration/http-jetty.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> + - + Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Bethal.cxf URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Bethal.cxf?rev=952435&r1=952434&r2=952435&view=diff ============================================================================== --- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Bethal.cxf (original) +++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Bethal.cxf Mon Jun 7 21:08:08 2010 @@ -39,13 +39,14 @@ http://cxf.apache.org/schemas/configuration/http-jetty.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> + - + + @@ -42,6 +43,6 @@ serviceName="s:SOAPService" endpointName="s:Bethal" xmlns:s="http://apache.org/hello_world" - address="https://localhost:9002/Bethal"/> + address="https://localhost:${testutil.ports.BusServer.2}/Bethal"/> Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/BethalClientConfig.cxf URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/BethalClientConfig.cxf?rev=952435&r1=952434&r2=952435&view=diff ============================================================================== --- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/BethalClientConfig.cxf (original) +++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/BethalClientConfig.cxf Mon Jun 7 21:08:08 2010 @@ -32,6 +32,7 @@ http://cxf.apache.org/schemas/configuration/http-jetty.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> + Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Gordy.cxf URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Gordy.cxf?rev=952435&r1=952434&r2=952435&view=diff ============================================================================== --- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Gordy.cxf (original) +++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Gordy.cxf Mon Jun 7 21:08:08 2010 @@ -39,14 +39,15 @@ http://cxf.apache.org/schemas/configuration/http-jetty.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> + - + - + + Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Hurlon.cxf URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Hurlon.cxf?rev=952435&r1=952434&r2=952435&view=diff ============================================================================== --- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Hurlon.cxf (original) +++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Hurlon.cxf Mon Jun 7 21:08:08 2010 @@ -39,9 +39,10 @@ http://cxf.apache.org/schemas/configuration/http-jetty.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> + - + Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Morpit.cxf URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Morpit.cxf?rev=952435&r1=952434&r2=952435&view=diff ============================================================================== --- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Morpit.cxf (original) +++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Morpit.cxf Mon Jun 7 21:08:08 2010 @@ -39,12 +39,13 @@ http://cxf.apache.org/schemas/configuration/http-jetty.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> + - + + - + - + + - + Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml?rev=952435&r1=952434&r2=952435&view=diff ============================================================================== --- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml (original) +++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer.xml Mon Jun 7 21:08:08 2010 @@ -32,9 +32,10 @@ http://cxf.apache.org/schemas/configuration/http-jetty.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> + - + true Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer_Windows.xml URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer_Windows.xml?rev=952435&r1=952434&r2=952435&view=diff ============================================================================== --- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer_Windows.xml (original) +++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/SessionServer_Windows.xml Mon Jun 7 21:08:08 2010 @@ -32,9 +32,10 @@ http://cxf.apache.org/schemas/configuration/http-jetty.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> + - + true Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Tarpin.cxf URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Tarpin.cxf?rev=952435&r1=952434&r2=952435&view=diff ============================================================================== --- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Tarpin.cxf (original) +++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/http/resources/Tarpin.cxf Mon Jun 7 21:08:08 2010 @@ -40,13 +40,14 @@ http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> + - + - + + @@ -48,7 +49,7 @@ under the License. - + + @@ -46,114 +47,114 @@ under the License. + depends-on="port-testutil.ports.BusServer.0-tls-config"> + depends-on="port-testutil.ports.BusServer.1-tls-config"> + depends-on="port-testutil.ports.BusServer.2-tls-config"> + depends-on="port-testutil.ports.BusServer.3-tls-config"> + depends-on="port-testutil.ports.BusServer.4-tls-config"> + depends-on="port-testutil.ports.BusServer.5-tls-config"> + depends-on="port-testutil.ports.BusServer.6-tls-config"> + depends-on="port-testutil.ports.BusServer.7-tls-config"> - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + + @@ -47,7 +48,7 @@ under the License. - + + @@ -49,7 +50,7 @@ under the License. - + + @@ -48,7 +49,7 @@ under the License. - + - + + @@ -48,7 +49,7 @@ under the License. - + + + - + - + - + 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=952435&r1=952434&r2=952435&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 Mon Jun 7 21:08:08 2010 @@ -29,6 +29,7 @@ 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 "> + @@ -47,7 +48,7 @@ + address="http://localhost:${testutil.ports.EngineLifecycleTest.2}/Dummy"> @@ -55,7 +56,7 @@ + address="http://localhost:${testutil.ports.EngineLifecycleTest.1}/Dummy"> @@ -65,14 +66,14 @@ - + - + Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java?rev=952435&r1=952434&r2=952435&view=diff ============================================================================== --- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java (original) +++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletClientTest.java Mon Jun 7 21:08:08 2010 @@ -36,8 +36,10 @@ import org.junit.Test; public class NoSpringServletClientTest extends AbstractBusClientServerTestBase { + private static final String PORT = NoSpringServletServer.PORT; + private final QName portName = new QName("http://apache.org/hello_world_soap_http", "SoapPort"); - private final String serviceURL = "http://localhost:9000/soap/"; + private final String serviceURL = "http://localhost:" + PORT + "/soap/"; @BeforeClass public static void startServers() throws Exception { assertTrue("server did not launch correctly", launchServer(NoSpringServletServer.class)); Modified: cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletServer.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletServer.java?rev=952435&r1=952434&r2=952435&view=diff ============================================================================== --- cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletServer.java (original) +++ cxf/trunk/systests/transports/src/test/java/org/apache/cxf/systest/servlet/NoSpringServletServer.java Mon Jun 7 21:08:08 2010 @@ -31,6 +31,9 @@ import org.mortbay.jetty.servlet.Context import org.mortbay.jetty.servlet.ServletHolder; public class NoSpringServletServer extends AbstractBusTestServerBase { + public static final String PORT = allocatePort(NoSpringServletServer.class); + + Server httpServer; @Override protected void run() { @@ -38,7 +41,7 @@ public class NoSpringServletServer exten String busFactory = System.getProperty(BusFactory.BUS_FACTORY_PROPERTY_NAME); System.setProperty(BusFactory.BUS_FACTORY_PROPERTY_NAME, "org.apache.cxf.bus.CXFBusFactory"); try { - httpServer = new Server(9000); + httpServer = new Server(Integer.parseInt(PORT)); ContextHandlerCollection contexts = new ContextHandlerCollection(); httpServer.setHandler(contexts);