cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1244323 - in /cxf/branches/2.4.x-fixes: ./ rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/ rt/databinding/aegis/src/test/resources/org/apache/cxf/aegis/type/ rt/management/ rt/management/src/test/java/org/apache/cxf/managemen...
Date Wed, 15 Feb 2012 03:12:55 GMT
Author: dkulp
Date: Wed Feb 15 03:12:55 2012
New Revision: 1244323

URL: http://svn.apache.org/viewvc?rev=1244323&view=rev
Log:
Merged revisions 1244156 via  svn merge from
https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes

........
  r1244156 | dkulp | 2012-02-14 13:41:14 -0500 (Tue, 14 Feb 2012) | 9 lines
  
  Merged revisions 1243631 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1243631 | dkulp | 2012-02-13 13:10:06 -0500 (Mon, 13 Feb 2012) | 1 line
    
    Remove remaining hard coded ports in 7000-9999 range.
  ........
  
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/TypeCreationOptionsSpringTest.java
    cxf/branches/2.4.x-fixes/rt/databinding/aegis/src/test/resources/org/apache/cxf/aegis/type/aegisOptionsTestBeans.xml
    cxf/branches/2.4.x-fixes/rt/management/pom.xml
    cxf/branches/2.4.x-fixes/rt/management/src/test/java/org/apache/cxf/management/jmx/JMXManagedComponentManagerTest.java
    cxf/branches/2.4.x-fixes/rt/management/src/test/java/org/apache/cxf/management/jmx/MBServerConnectorTest.java
    cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java

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

Modified: cxf/branches/2.4.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/TypeCreationOptionsSpringTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/TypeCreationOptionsSpringTest.java?rev=1244323&r1=1244322&r2=1244323&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/TypeCreationOptionsSpringTest.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/databinding/aegis/src/test/java/org/apache/cxf/aegis/type/TypeCreationOptionsSpringTest.java
Wed Feb 15 03:12:55 2012
@@ -27,13 +27,17 @@ import org.apache.cxf.Bus;
 import org.apache.cxf.endpoint.Server;
 import org.apache.cxf.test.AbstractCXFSpringTest;
 import org.apache.cxf.test.TestUtilities;
+import org.apache.cxf.testutil.common.TestUtil;
+
 import org.junit.Test;
 
 /**
  * 
  */
 public class TypeCreationOptionsSpringTest extends AbstractCXFSpringTest {
-
+    public static final String PORT = TestUtil.getPortNumber(TypeCreationOptionsSpringTest.class);
+    
+    
     @Override
     protected String[] getConfigLocations() {
         setConfigContextClass(TypeCreationOptionsSpringTest.class);

Modified: cxf/branches/2.4.x-fixes/rt/databinding/aegis/src/test/resources/org/apache/cxf/aegis/type/aegisOptionsTestBeans.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/databinding/aegis/src/test/resources/org/apache/cxf/aegis/type/aegisOptionsTestBeans.xml?rev=1244323&r1=1244322&r2=1244323&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/databinding/aegis/src/test/resources/org/apache/cxf/aegis/type/aegisOptionsTestBeans.xml
(original)
+++ cxf/branches/2.4.x-fixes/rt/databinding/aegis/src/test/resources/org/apache/cxf/aegis/type/aegisOptionsTestBeans.xml
Wed Feb 15 03:12:55 2012
@@ -27,6 +27,7 @@
            http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd
            http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
           ">
+  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
 
 	<import resource="classpath:META-INF/cxf/cxf.xml" />
 
@@ -56,7 +57,7 @@
         </bean>
 
         <jaxws:endpoint id="aegisServiceTest"
-        	implementor="#aegisService" address="http://localhost:9876/aegis">
+        	implementor="#aegisService" address="http://localhost:${testutil.ports.TypeCreationOptionsSpringTest}/aegis">
         	<jaxws:serviceFactory>
         		<ref bean='jaxws-and-aegis-service-factory' />
         	</jaxws:serviceFactory>

Modified: cxf/branches/2.4.x-fixes/rt/management/pom.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/management/pom.xml?rev=1244323&r1=1244322&r2=1244323&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/management/pom.xml (original)
+++ cxf/branches/2.4.x-fixes/rt/management/pom.xml Wed Feb 15 03:12:55 2012
@@ -54,6 +54,12 @@
             <artifactId>cxf-rt-core</artifactId>
             <version>${project.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-testutils</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+        </dependency>
 
         <dependency>
             <groupId>org.springframework</groupId>

Modified: cxf/branches/2.4.x-fixes/rt/management/src/test/java/org/apache/cxf/management/jmx/JMXManagedComponentManagerTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/management/src/test/java/org/apache/cxf/management/jmx/JMXManagedComponentManagerTest.java?rev=1244323&r1=1244322&r2=1244323&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/management/src/test/java/org/apache/cxf/management/jmx/JMXManagedComponentManagerTest.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/management/src/test/java/org/apache/cxf/management/jmx/JMXManagedComponentManagerTest.java
Wed Feb 15 03:12:55 2012
@@ -28,13 +28,15 @@ import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
 import org.apache.cxf.management.jmx.export.AnnotationTestInstrumentation;
+import org.apache.cxf.testutil.common.TestUtil;
+
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 
 public class JMXManagedComponentManagerTest extends Assert {
-       
+    private static final String PORT = TestUtil.getPortNumber(JMXManagedComponentManagerTest.class);
     private static final String NAME_ATTRIBUTE = "Name";    
     private InstrumentationManagerImpl manager;
     
@@ -44,7 +46,7 @@ public class JMXManagedComponentManagerT
         manager.setDaemon(false);
         manager.setThreaded(true);
         manager.setEnabled(true);
-        manager.setJMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:9913/jmxrmi");
+        manager.setJMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:" + PORT + "/jmxrmi");
         manager.init();
         //Wait for MBeanServer connector to be initialized on separate thread.
         Thread.sleep(2000);
@@ -130,7 +132,7 @@ public class JMXManagedComponentManagerT
         // cannot be created.
         this.manager.setThreaded(false);
         this.manager.setEnabled(true);
-        this.manager.setJMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:9913/jmxrmi");
+        this.manager.setJMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:" + PORT +
"/jmxrmi");
         this.manager.setServer(server);
         this.manager.register();
         this.manager.init();
@@ -164,7 +166,7 @@ public class JMXManagedComponentManagerT
         // cannot be created.
         this.manager.setThreaded(false);
         this.manager.setEnabled(true);
-        this.manager.setJMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:9913/jmxrmi");
+        this.manager.setJMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:" + PORT +
"/jmxrmi");
         this.manager.setServer(server);
         this.manager.register();
         this.manager.init();

Modified: cxf/branches/2.4.x-fixes/rt/management/src/test/java/org/apache/cxf/management/jmx/MBServerConnectorTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/management/src/test/java/org/apache/cxf/management/jmx/MBServerConnectorTest.java?rev=1244323&r1=1244322&r2=1244323&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/management/src/test/java/org/apache/cxf/management/jmx/MBServerConnectorTest.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/management/src/test/java/org/apache/cxf/management/jmx/MBServerConnectorTest.java
Wed Feb 15 03:12:55 2012
@@ -24,13 +24,16 @@ package org.apache.cxf.management.jmx;
 import javax.management.MBeanServer;
 import javax.management.MBeanServerFactory;
 
+import org.apache.cxf.testutil.common.TestUtil;
+
 import org.junit.Assert;
 import org.junit.Test;
 
 
 
 public class MBServerConnectorTest extends Assert {
-    
+    private static final String PORT = TestUtil.getPortNumber(MBServerConnectorTest.class);
+
     @Test
     public void testMBServerConnector() {
         MBServerConnectorFactory mcf;    
@@ -40,7 +43,7 @@ public class MBServerConnectorTest exten
         mcf.setMBeanServer(mbs);
         mcf.setThreaded(true);
         mcf.setDaemon(true);
-        mcf.setServiceUrl("service:jmx:rmi:///jndi/rmi://localhost:9913/jmxrmi");
+        mcf.setServiceUrl("service:jmx:rmi:///jndi/rmi://localhost:" + PORT + "/jmxrmi");
         try {
             mcf.createConnector(); 
             Thread.sleep(1000);           

Modified: cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java?rev=1244323&r1=1244322&r2=1244323&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/transports/http-jetty/src/test/java/org/apache/cxf/transport/http_jetty/JettyHTTPServerEngineTest.java
Wed Feb 15 03:12:55 2012
@@ -40,6 +40,7 @@ import org.apache.cxf.configuration.spri
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.helpers.IOUtils;
 import org.apache.cxf.management.InstrumentationManager;
+import org.apache.cxf.testutil.common.TestUtil;
 import org.easymock.EasyMock;
 import org.easymock.IMocksControl;
 
@@ -54,6 +55,13 @@ import org.junit.Before;
 import org.junit.Test;
 
 public class JettyHTTPServerEngineTest extends Assert {
+    private static final int PORT1 
+        = Integer.valueOf(TestUtil.getPortNumber(JettyHTTPServerEngineTest.class, 1));
+    private static final int PORT2
+        = Integer.valueOf(TestUtil.getPortNumber(JettyHTTPServerEngineTest.class, 2));
+    private static final int PORT3 
+        = Integer.valueOf(TestUtil.getPortNumber(JettyHTTPServerEngineTest.class, 3));
+    
 
     private Bus bus;
     private IMocksControl control;
@@ -85,11 +93,11 @@ public class JettyHTTPServerEngineTest e
     @Test
     public void testEngineRetrieval() throws Exception {
         JettyHTTPServerEngine engine =
-            factory.createJettyHTTPServerEngine(9234, "http");
+            factory.createJettyHTTPServerEngine(PORT1, "http");
 
         assertTrue(
             "Engine references for the same port should point to the same instance",
-            engine == factory.retrieveJettyHTTPServerEngine(9234));
+            engine == factory.retrieveJettyHTTPServerEngine(PORT1));
 
         factory.destroyForPort(1234);
     }
@@ -97,14 +105,14 @@ public class JettyHTTPServerEngineTest e
     @Test
     public void testHttpAndHttps() throws Exception {
         JettyHTTPServerEngine engine =
-            factory.createJettyHTTPServerEngine(9234, "http");
+            factory.createJettyHTTPServerEngine(PORT1, "http");
 
         assertTrue("Protocol must be http",
                 "http".equals(engine.getProtocol()));
 
         engine = new JettyHTTPServerEngine();
         engine.setJettyHTTPServerEngineFactory(factory);
-        engine.setPort(9235);
+        engine.setPort(PORT2);
         engine.setMaxIdleTime(30000);
         engine.setTlsServerParameters(new TLSServerParameters());
         engine.finalizeConfig();
@@ -112,27 +120,27 @@ public class JettyHTTPServerEngineTest e
         List<JettyHTTPServerEngine> list = new ArrayList<JettyHTTPServerEngine>();
         list.add(engine);
         factory.setEnginesList(list);
-        engine = factory.createJettyHTTPServerEngine(9235, "https");
+        engine = factory.createJettyHTTPServerEngine(PORT2, "https");
         JettyHTTPTestHandler handler1 = new JettyHTTPTestHandler("string1", true);
         // need to create a servant to create the connector
-        engine.addServant(new URL("https://localhost:9235/test"), handler1);
+        engine.addServant(new URL("https://localhost:" + PORT2 + "/test"), handler1);
         assertTrue("Protocol must be https",
                 "https".equals(engine.getProtocol()));
         assertEquals("Get the wrong maxIdleTime.", 30000, engine.getConnector().getMaxIdleTime());
 
-        factory.setTLSServerParametersForPort(9234, new TLSServerParameters());
-        engine = factory.createJettyHTTPServerEngine(9234, "https");
+        factory.setTLSServerParametersForPort(PORT1, new TLSServerParameters());
+        engine = factory.createJettyHTTPServerEngine(PORT1, "https");
         assertTrue("Protocol must be https",
                    "https".equals(engine.getProtocol()));
 
-        factory.setTLSServerParametersForPort(9236, new TLSServerParameters());
-        engine = factory.createJettyHTTPServerEngine(9236, "https");
+        factory.setTLSServerParametersForPort(PORT3, new TLSServerParameters());
+        engine = factory.createJettyHTTPServerEngine(PORT3, "https");
         assertTrue("Protocol must be https",
                    "https".equals(engine.getProtocol()));
 
-        factory.destroyForPort(9234);
-        factory.destroyForPort(9235);
-        factory.destroyForPort(9236);
+        factory.destroyForPort(PORT1);
+        factory.destroyForPort(PORT2);
+        factory.destroyForPort(PORT3);
     }
 
 
@@ -172,10 +180,10 @@ public class JettyHTTPServerEngineTest e
 
     @Test
     public void testaddServants() throws Exception {
-        String urlStr = "http://localhost:9234/hello/test";
-        String urlStr2 = "http://localhost:9234/hello233/test";
+        String urlStr = "http://localhost:" + PORT1 + "/hello/test";
+        String urlStr2 = "http://localhost:" + PORT1 + "/hello233/test";
         JettyHTTPServerEngine engine =
-            factory.createJettyHTTPServerEngine(9234, "http");
+            factory.createJettyHTTPServerEngine(PORT1, "http");
         engine.setMaxIdleTime(30000);
         JettyHTTPTestHandler handler1 = new JettyHTTPTestHandler("string1", true);
         JettyHTTPTestHandler handler2 = new JettyHTTPTestHandler("string2", true);
@@ -200,8 +208,7 @@ public class JettyHTTPServerEngineTest e
         response = getResponse(urlStr2);
         assertEquals("The jetty http handler did not take effect", response, "string2");
         // set the get request
-        factory.destroyForPort(9234);
-
+        factory.destroyForPort(PORT1);
     }
     
     /**
@@ -210,12 +217,12 @@ public class JettyHTTPServerEngineTest e
      */
     @Test
     public void testJmxSupport() throws Exception {
-        String urlStr = "http://localhost:9234/hello/test";
-        String urlStr2 = "http://localhost:9235/hello/test";
+        String urlStr = "http://localhost:" + PORT1 + "/hello/test";
+        String urlStr2 = "http://localhost:" + PORT2 + "/hello/test";
         JettyHTTPServerEngine engine =
-            factory.createJettyHTTPServerEngine(9234, "http");
+            factory.createJettyHTTPServerEngine(PORT1, "http");
         JettyHTTPServerEngine engine2 =
-            factory.createJettyHTTPServerEngine(9235, "http");
+            factory.createJettyHTTPServerEngine(PORT2, "http");
         JettyHTTPTestHandler handler1 = new JettyHTTPTestHandler("string1", true);
         JettyHTTPTestHandler handler2 = new JettyHTTPTestHandler("string2", true);
         
@@ -247,18 +254,18 @@ public class JettyHTTPServerEngineTest e
             queryNames(new ObjectName("org.eclipse.jetty.server:type=server,*"), null));
         assertEquals("Could not find 0 Jetty Server: " + s, 0, s.size());
         
-        factory.destroyForPort(9234);
-        factory.destroyForPort(9235);
+        factory.destroyForPort(PORT1);
+        factory.destroyForPort(PORT2);
     }
 
     @Test
     public void testSetHandlers() throws Exception {
-        URL url = new URL("http://localhost:9235/hello/test");
+        URL url = new URL("http://localhost:" + PORT2 + "/hello/test");
         JettyHTTPTestHandler handler1 = new JettyHTTPTestHandler("string1", true);
         JettyHTTPTestHandler handler2 = new JettyHTTPTestHandler("string2", true);
 
         JettyHTTPServerEngine engine = new JettyHTTPServerEngine();
-        engine.setPort(9235);
+        engine.setPort(PORT2);
         engine.setJettyHTTPServerEngineFactory(factory);
 
         List<Handler> handlers = new ArrayList<Handler>();
@@ -279,9 +286,9 @@ public class JettyHTTPServerEngineTest e
 
     @Test
     public void testGetContextHandler() throws Exception {
-        String urlStr = "http://localhost:9234/hello/test";
+        String urlStr = "http://localhost:" + PORT1 + "/hello/test";
         JettyHTTPServerEngine engine =
-            factory.createJettyHTTPServerEngine(9234, "http");
+            factory.createJettyHTTPServerEngine(PORT1, "http");
         ContextHandler contextHandler = engine.getContextHandler(new URL(urlStr));
         // can't find the context handler here
         assertNull(contextHandler);
@@ -307,15 +314,15 @@ public class JettyHTTPServerEngineTest e
             fail("Can't get the reponse from the server " + ex);
         }
         assertEquals("the jetty http handler did not take effect", response, "string2");
-        factory.destroyForPort(9234);
+        factory.destroyForPort(PORT1);
     }
 
     @Test
     public void testJettyHTTPHandler() throws Exception {
-        String urlStr1 = "http://localhost:9236/hello/test";
-        String urlStr2 = "http://localhost:9236/hello/test2";
+        String urlStr1 = "http://localhost:" + PORT3 + "/hello/test";
+        String urlStr2 = "http://localhost:" + PORT3 + "/hello/test2";
         JettyHTTPServerEngine engine =
-            factory.createJettyHTTPServerEngine(9236, "http");
+            factory.createJettyHTTPServerEngine(PORT3, "http");
         ContextHandler contextHandler = engine.getContextHandler(new URL(urlStr1));
         // can't find the context handler here
         assertNull(contextHandler);
@@ -340,7 +347,7 @@ public class JettyHTTPServerEngineTest e
         }
         assertEquals("the jetty http handler did not take effect", response, "test2");
 
-        factory.destroyForPort(9236);
+        factory.destroyForPort(PORT3);
     }
 
     private String getResponse(String target) throws Exception {



Mime
View raw message