You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by on...@apache.org on 2018/12/04 07:48:18 UTC

[camel] branch master updated (3f3cc07 -> 65e2f2f)

This is an automated email from the ASF dual-hosted git repository.

onders pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git.


    from 3f3cc07  Upgrade Vertx to version 3.6.0
     new 8c7d405  Avoid potentially conflicting jetty port during test execution
     new 65e2f2f  CAMEL-12944 - externalize configs as PR #2549 tried to avoid potentially conflicting jetty port during test execution

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../ribbon/cloud/SpringRibbonServiceCallRouteTest.java | 16 ++++++++++++----
 .../cloud/SpringBeanRibbonServiceCallRouteTest.xml     | 18 +++++++++++-------
 .../SpringDslRibbonPropertiesServiceCallRouteTest.xml  | 18 +++++++++++-------
 .../cloud/SpringDslRibbonServiceCallRouteTest.xml      | 18 +++++++++++-------
 .../springbeanribbonservicecallroutetest.properties}   |  3 ++-
 ...dslribbonpropertiesservicecallroutetest.properties} |  3 ++-
 .../springdslribbonservicecallroutetest.properties}    |  3 ++-
 7 files changed, 51 insertions(+), 28 deletions(-)
 copy components/{camel-cdi/src/test/resources/bar.properties => camel-ribbon/src/test/resources/springbeanribbonservicecallroutetest.properties} (96%)
 copy components/{camel-cdi/src/test/resources/bar.properties => camel-ribbon/src/test/resources/springdslribbonpropertiesservicecallroutetest.properties} (96%)
 copy components/{camel-cdi/src/test/resources/bar.properties => camel-ribbon/src/test/resources/springdslribbonservicecallroutetest.properties} (96%)


[camel] 01/02: Avoid potentially conflicting jetty port during test execution

Posted by on...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

onders pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 8c7d405911ee23c7ee63a2a44bd857b5e5c0e928
Author: Aurélien Pupier <ap...@redhat.com>
AuthorDate: Wed Oct 3 14:00:30 2018 +0200

    Avoid potentially conflicting jetty port during test execution
    
    in case tests are not cleaning correctly the Jetty server or are
    launched in parallel, having different ports will avoid to have port
    still occupied for other tests
    
    Signed-off-by: Aurélien Pupier <ap...@redhat.com>
---
 .../ribbon/cloud/SpringBeanServiceCallRouteTest.java       |  8 ++++++++
 .../SpringDslRibbonPropertiesServiceCallRouteTest.java     |  9 +++++++++
 .../ribbon/cloud/SpringDslRibbonServiceCallRouteTest.java  |  8 ++++++++
 .../ribbon/cloud/SpringRibbonServiceCallRouteTest.java     | 12 ++++++++----
 .../ribbon/cloud/SpringBeanRibbonServiceCallRouteTest.xml  | 14 +++++++-------
 .../SpringDslRibbonPropertiesServiceCallRouteTest.xml      | 14 +++++++-------
 .../ribbon/cloud/SpringDslRibbonServiceCallRouteTest.xml   | 14 +++++++-------
 7 files changed, 54 insertions(+), 25 deletions(-)

diff --git a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringBeanServiceCallRouteTest.java b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringBeanServiceCallRouteTest.java
index 5cbf8c4..fc264ff 100644
--- a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringBeanServiceCallRouteTest.java
+++ b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringBeanServiceCallRouteTest.java
@@ -42,5 +42,13 @@ public class SpringBeanServiceCallRouteTest extends SpringRibbonServiceCallRoute
         RibbonServiceLoadBalancer loadBalancer = (RibbonServiceLoadBalancer)processor.getLoadBalancer();
         Assert.assertTrue(loadBalancer.getServiceDiscovery() instanceof StaticServiceDiscovery);
     }
+    
+    protected String getFirstPort() {
+        return "9092";
+    }
+    
+    protected String getSecondPort() {
+        return "9093";
+    }
 }
 
diff --git a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringDslRibbonPropertiesServiceCallRouteTest.java b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringDslRibbonPropertiesServiceCallRouteTest.java
index 56d734f..736bed4 100644
--- a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringDslRibbonPropertiesServiceCallRouteTest.java
+++ b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringDslRibbonPropertiesServiceCallRouteTest.java
@@ -41,5 +41,14 @@ public class SpringDslRibbonPropertiesServiceCallRouteTest extends SpringRibbonS
         RibbonServiceLoadBalancer loadBalancer = (RibbonServiceLoadBalancer)processor.getLoadBalancer();
         Assert.assertNull(loadBalancer.getServiceDiscovery());
     }
+
+    protected String getFirstPort() {
+        return "9094";
+    }
+    
+    protected String getSecondPort() {
+        return "9095";
+    }
+
 }
 
diff --git a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringDslRibbonServiceCallRouteTest.java b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringDslRibbonServiceCallRouteTest.java
index bb5304e..271d723 100644
--- a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringDslRibbonServiceCallRouteTest.java
+++ b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringDslRibbonServiceCallRouteTest.java
@@ -42,5 +42,13 @@ public class SpringDslRibbonServiceCallRouteTest extends SpringRibbonServiceCall
         RibbonServiceLoadBalancer loadBalancer = (RibbonServiceLoadBalancer)processor.getLoadBalancer();
         Assert.assertTrue(loadBalancer.getServiceDiscovery() instanceof StaticServiceDiscovery);
     }
+    
+    protected String getFirstPort() {
+        return "9096";
+    }
+    
+    protected String getSecondPort() {
+        return "9097";
+    }
 }
 
diff --git a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringRibbonServiceCallRouteTest.java b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringRibbonServiceCallRouteTest.java
index 0ca03f8..43376d7 100644
--- a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringRibbonServiceCallRouteTest.java
+++ b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringRibbonServiceCallRouteTest.java
@@ -32,18 +32,22 @@ import org.springframework.test.annotation.DirtiesContext;
 public abstract class SpringRibbonServiceCallRouteTest extends CamelSpringTestSupport {
     @Test
     public void testServiceCall() throws Exception {
-        getMockEndpoint("mock:9090").expectedMessageCount(1);
-        getMockEndpoint("mock:9091").expectedMessageCount(1);
+        getMockEndpoint("mock:"+getFirstPort()).expectedMessageCount(1);
+        getMockEndpoint("mock:"+getSecondPort()).expectedMessageCount(1);
         getMockEndpoint("mock:result").expectedMessageCount(2);
 
         String out = template.requestBody("direct:start", null, String.class);
         String out2 = template.requestBody("direct:start", null, String.class);
-        assertEquals("9091", out);
-        assertEquals("9090", out2);
+        assertEquals(getSecondPort(), out);
+        assertEquals(getFirstPort(), out2);
 
         assertMockEndpointsSatisfied();
     }
 
+    protected abstract String getSecondPort();
+
+    protected abstract String getFirstPort();
+
     // ************************************
     // Helpers
     // ************************************
diff --git a/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringBeanRibbonServiceCallRouteTest.xml b/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringBeanRibbonServiceCallRouteTest.xml
index 55654bf..e69d9a8 100644
--- a/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringBeanRibbonServiceCallRouteTest.xml
+++ b/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringBeanRibbonServiceCallRouteTest.xml
@@ -27,7 +27,7 @@
 
   <!-- setup a static ribbon server list with these 2 servers to start with -->
   <bean id="discovery" class="org.apache.camel.impl.cloud.StaticServiceDiscovery">
-    <property name="servers" value="localhost:9090,localhost:9091"/>
+    <property name="servers" value="localhost:9092,localhost:9093"/>
   </bean>
 
   <bean id="balancer" class="org.apache.camel.component.ribbon.cloud.RibbonServiceLoadBalancer">
@@ -48,18 +48,18 @@
     </route>
 
     <route>
-      <from uri="jetty:http://localhost:9090"/>
-      <to uri="mock:9090"/>
+      <from uri="jetty:http://localhost:9092"/>
+      <to uri="mock:9092"/>
       <transform>
-        <constant>9090</constant>
+        <constant>9092</constant>
       </transform>
     </route>
 
     <route>
-      <from uri="jetty:http://localhost:9091"/>
-      <to uri="mock:9091"/>
+      <from uri="jetty:http://localhost:9093"/>
+      <to uri="mock:9093"/>
       <transform>
-        <constant>9091</constant>
+        <constant>9093</constant>
       </transform>
     </route>
   </camelContext>
diff --git a/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringDslRibbonPropertiesServiceCallRouteTest.xml b/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringDslRibbonPropertiesServiceCallRouteTest.xml
index 6fb2da3..0c6aa06 100644
--- a/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringDslRibbonPropertiesServiceCallRouteTest.xml
+++ b/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringDslRibbonPropertiesServiceCallRouteTest.xml
@@ -31,25 +31,25 @@
       <serviceCall name="myService" component="jetty">
         <!-- enable ribbon load balancer -->
         <ribbonLoadBalancer clientName="myClient">
-          <properties key="listOfServers" value="localhost:9090,localhost:9091"/>
+          <properties key="listOfServers" value="localhost:9094,localhost:9095"/>
         </ribbonLoadBalancer>
       </serviceCall>
       <to uri="mock:result"/>
     </route>
 
     <route>
-      <from uri="jetty:http://localhost:9090"/>
-      <to uri="mock:9090"/>
+      <from uri="jetty:http://localhost:9094"/>
+      <to uri="mock:9094"/>
       <transform>
-        <constant>9090</constant>
+        <constant>9094</constant>
       </transform>
     </route>
 
     <route>
-      <from uri="jetty:http://localhost:9091"/>
-      <to uri="mock:9091"/>
+      <from uri="jetty:http://localhost:9095"/>
+      <to uri="mock:9095"/>
       <transform>
-        <constant>9091</constant>
+        <constant>9095</constant>
       </transform>
     </route>
   </camelContext>
diff --git a/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringDslRibbonServiceCallRouteTest.xml b/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringDslRibbonServiceCallRouteTest.xml
index 60560ea..433aec3 100644
--- a/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringDslRibbonServiceCallRouteTest.xml
+++ b/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringDslRibbonServiceCallRouteTest.xml
@@ -31,7 +31,7 @@
       <serviceCall name="myService" component="jetty">
         <!-- static list of servers -->
         <staticServiceDiscovery>
-          <servers>localhost:9090,localhost:9091</servers>
+          <servers>localhost:9096,localhost:9097</servers>
         </staticServiceDiscovery>
 
         <!-- enable ribbon load balancer -->
@@ -41,18 +41,18 @@
     </route>
 
     <route>
-      <from uri="jetty:http://localhost:9090"/>
-      <to uri="mock:9090"/>
+      <from uri="jetty:http://localhost:9096"/>
+      <to uri="mock:9096"/>
       <transform>
-        <constant>9090</constant>
+        <constant>9096</constant>
       </transform>
     </route>
 
     <route>
-      <from uri="jetty:http://localhost:9091"/>
-      <to uri="mock:9091"/>
+      <from uri="jetty:http://localhost:9097"/>
+      <to uri="mock:9097"/>
       <transform>
-        <constant>9091</constant>
+        <constant>9097</constant>
       </transform>
     </route>
   </camelContext>


[camel] 02/02: CAMEL-12944 - externalize configs as PR #2549 tried to avoid potentially conflicting jetty port during test execution

Posted by on...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

onders pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 65e2f2f7aa3d4b0782404abb7db67880f7025807
Author: onders <on...@apache.org>
AuthorDate: Tue Dec 4 01:03:28 2018 +0300

    CAMEL-12944 - externalize configs as PR #2549 tried to avoid potentially conflicting jetty port during test execution
---
 .../ribbon/cloud/SpringBeanServiceCallRouteTest.java |  8 --------
 ...pringDslRibbonPropertiesServiceCallRouteTest.java |  9 ---------
 .../cloud/SpringDslRibbonServiceCallRouteTest.java   |  8 --------
 .../cloud/SpringRibbonServiceCallRouteTest.java      | 20 ++++++++++++--------
 .../cloud/SpringBeanRibbonServiceCallRouteTest.xml   | 18 +++++++++++-------
 ...SpringDslRibbonPropertiesServiceCallRouteTest.xml | 18 +++++++++++-------
 .../cloud/SpringDslRibbonServiceCallRouteTest.xml    | 18 +++++++++++-------
 .../springbeanribbonservicecallroutetest.properties  | 19 +++++++++++++++++++
 ...slribbonpropertiesservicecallroutetest.properties | 19 +++++++++++++++++++
 .../springdslribbonservicecallroutetest.properties   | 19 +++++++++++++++++++
 10 files changed, 102 insertions(+), 54 deletions(-)

diff --git a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringBeanServiceCallRouteTest.java b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringBeanServiceCallRouteTest.java
index fc264ff..5cbf8c4 100644
--- a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringBeanServiceCallRouteTest.java
+++ b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringBeanServiceCallRouteTest.java
@@ -42,13 +42,5 @@ public class SpringBeanServiceCallRouteTest extends SpringRibbonServiceCallRoute
         RibbonServiceLoadBalancer loadBalancer = (RibbonServiceLoadBalancer)processor.getLoadBalancer();
         Assert.assertTrue(loadBalancer.getServiceDiscovery() instanceof StaticServiceDiscovery);
     }
-    
-    protected String getFirstPort() {
-        return "9092";
-    }
-    
-    protected String getSecondPort() {
-        return "9093";
-    }
 }
 
diff --git a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringDslRibbonPropertiesServiceCallRouteTest.java b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringDslRibbonPropertiesServiceCallRouteTest.java
index 736bed4..56d734f 100644
--- a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringDslRibbonPropertiesServiceCallRouteTest.java
+++ b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringDslRibbonPropertiesServiceCallRouteTest.java
@@ -41,14 +41,5 @@ public class SpringDslRibbonPropertiesServiceCallRouteTest extends SpringRibbonS
         RibbonServiceLoadBalancer loadBalancer = (RibbonServiceLoadBalancer)processor.getLoadBalancer();
         Assert.assertNull(loadBalancer.getServiceDiscovery());
     }
-
-    protected String getFirstPort() {
-        return "9094";
-    }
-    
-    protected String getSecondPort() {
-        return "9095";
-    }
-
 }
 
diff --git a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringDslRibbonServiceCallRouteTest.java b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringDslRibbonServiceCallRouteTest.java
index 271d723..bb5304e 100644
--- a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringDslRibbonServiceCallRouteTest.java
+++ b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringDslRibbonServiceCallRouteTest.java
@@ -42,13 +42,5 @@ public class SpringDslRibbonServiceCallRouteTest extends SpringRibbonServiceCall
         RibbonServiceLoadBalancer loadBalancer = (RibbonServiceLoadBalancer)processor.getLoadBalancer();
         Assert.assertTrue(loadBalancer.getServiceDiscovery() instanceof StaticServiceDiscovery);
     }
-    
-    protected String getFirstPort() {
-        return "9096";
-    }
-    
-    protected String getSecondPort() {
-        return "9097";
-    }
 }
 
diff --git a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringRibbonServiceCallRouteTest.java b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringRibbonServiceCallRouteTest.java
index 43376d7..a83e210 100644
--- a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringRibbonServiceCallRouteTest.java
+++ b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/SpringRibbonServiceCallRouteTest.java
@@ -21,6 +21,7 @@ import java.util.Optional;
 
 import org.apache.camel.Navigate;
 import org.apache.camel.Processor;
+import org.apache.camel.PropertyInject;
 import org.apache.camel.Route;
 import org.apache.camel.impl.cloud.DefaultServiceCallProcessor;
 import org.apache.camel.test.spring.CamelSpringTestSupport;
@@ -30,24 +31,27 @@ import org.springframework.test.annotation.DirtiesContext;
 
 @DirtiesContext
 public abstract class SpringRibbonServiceCallRouteTest extends CamelSpringTestSupport {
+    
+    @PropertyInject("firstPort")
+    private String firstPort;
+
+    @PropertyInject("secondPort")
+    private String secondPort;
+
     @Test
     public void testServiceCall() throws Exception {
-        getMockEndpoint("mock:"+getFirstPort()).expectedMessageCount(1);
-        getMockEndpoint("mock:"+getSecondPort()).expectedMessageCount(1);
+        getMockEndpoint("mock:{{firstPort}}").expectedMessageCount(1);
+        getMockEndpoint("mock:{{secondPort}}").expectedMessageCount(1);
         getMockEndpoint("mock:result").expectedMessageCount(2);
 
         String out = template.requestBody("direct:start", null, String.class);
         String out2 = template.requestBody("direct:start", null, String.class);
-        assertEquals(getSecondPort(), out);
-        assertEquals(getFirstPort(), out2);
+        assertEquals(secondPort, out);
+        assertEquals(firstPort, out2);
 
         assertMockEndpointsSatisfied();
     }
 
-    protected abstract String getSecondPort();
-
-    protected abstract String getFirstPort();
-
     // ************************************
     // Helpers
     // ************************************
diff --git a/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringBeanRibbonServiceCallRouteTest.xml b/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringBeanRibbonServiceCallRouteTest.xml
index e69d9a8..692bd68 100644
--- a/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringBeanRibbonServiceCallRouteTest.xml
+++ b/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringBeanRibbonServiceCallRouteTest.xml
@@ -24,10 +24,14 @@
          http://www.springframework.org/schema/beans/spring-beans.xsd
          http://camel.apache.org/schema/spring
          http://camel.apache.org/schema/spring/camel-spring.xsd">
+         
+  <bean id="bridgePropertyPlaceholder" class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer">
+    <property name="location" value="classpath:springbeanribbonservicecallroutetest.properties" />
+  </bean>
 
   <!-- setup a static ribbon server list with these 2 servers to start with -->
   <bean id="discovery" class="org.apache.camel.impl.cloud.StaticServiceDiscovery">
-    <property name="servers" value="localhost:9092,localhost:9093"/>
+    <property name="servers" value="localhost:${firstPort},localhost:${secondPort}"/>
   </bean>
 
   <bean id="balancer" class="org.apache.camel.component.ribbon.cloud.RibbonServiceLoadBalancer">
@@ -48,18 +52,18 @@
     </route>
 
     <route>
-      <from uri="jetty:http://localhost:9092"/>
-      <to uri="mock:9092"/>
+      <from uri="jetty:http://localhost:{{firstPort}}"/>
+      <to uri="mock:{{firstPort}}"/>
       <transform>
-        <constant>9092</constant>
+        <constant>{{firstPort}}</constant>
       </transform>
     </route>
 
     <route>
-      <from uri="jetty:http://localhost:9093"/>
-      <to uri="mock:9093"/>
+      <from uri="jetty:http://localhost:{{secondPort}}"/>
+      <to uri="mock:{{secondPort}}"/>
       <transform>
-        <constant>9093</constant>
+        <constant>{{secondPort}}</constant>
       </transform>
     </route>
   </camelContext>
diff --git a/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringDslRibbonPropertiesServiceCallRouteTest.xml b/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringDslRibbonPropertiesServiceCallRouteTest.xml
index 0c6aa06..368833e 100644
--- a/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringDslRibbonPropertiesServiceCallRouteTest.xml
+++ b/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringDslRibbonPropertiesServiceCallRouteTest.xml
@@ -25,31 +25,35 @@
          http://camel.apache.org/schema/spring
          http://camel.apache.org/schema/spring/camel-spring.xsd">
 
+  <bean id="bridgePropertyPlaceholder" class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer">
+    <property name="location" value="classpath:springdslribbonpropertiesservicecallroutetest.properties" />
+  </bean> 
+
   <camelContext xmlns="http://camel.apache.org/schema/spring">
     <route id="scall">
       <from uri="direct:start"/>
       <serviceCall name="myService" component="jetty">
         <!-- enable ribbon load balancer -->
         <ribbonLoadBalancer clientName="myClient">
-          <properties key="listOfServers" value="localhost:9094,localhost:9095"/>
+          <properties key="listOfServers" value="localhost:{{firstPort}},localhost:{{secondPort}}"/>
         </ribbonLoadBalancer>
       </serviceCall>
       <to uri="mock:result"/>
     </route>
 
     <route>
-      <from uri="jetty:http://localhost:9094"/>
-      <to uri="mock:9094"/>
+      <from uri="jetty:http://localhost:{{firstPort}}"/>
+      <to uri="mock:{{firstPort}}"/>
       <transform>
-        <constant>9094</constant>
+        <constant>{{firstPort}}</constant>
       </transform>
     </route>
 
     <route>
-      <from uri="jetty:http://localhost:9095"/>
-      <to uri="mock:9095"/>
+      <from uri="jetty:http://localhost:{{secondPort}}"/>
+      <to uri="mock:{{secondPort}}"/>
       <transform>
-        <constant>9095</constant>
+        <constant>{{secondPort}}</constant>
       </transform>
     </route>
   </camelContext>
diff --git a/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringDslRibbonServiceCallRouteTest.xml b/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringDslRibbonServiceCallRouteTest.xml
index 433aec3..63add53 100644
--- a/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringDslRibbonServiceCallRouteTest.xml
+++ b/components/camel-ribbon/src/test/resources/org/apache/camel/component/ribbon/cloud/SpringDslRibbonServiceCallRouteTest.xml
@@ -24,6 +24,10 @@
          http://www.springframework.org/schema/beans/spring-beans.xsd
          http://camel.apache.org/schema/spring
          http://camel.apache.org/schema/spring/camel-spring.xsd">
+         
+  <bean id="bridgePropertyPlaceholder" class="org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer">
+    <property name="location" value="classpath:springdslribbonservicecallroutetest.properties" />
+  </bean> 
 
   <camelContext xmlns="http://camel.apache.org/schema/spring">
     <route id="scall">
@@ -31,7 +35,7 @@
       <serviceCall name="myService" component="jetty">
         <!-- static list of servers -->
         <staticServiceDiscovery>
-          <servers>localhost:9096,localhost:9097</servers>
+          <servers>localhost:{{firstPort}},localhost:{{secondPort}}</servers>
         </staticServiceDiscovery>
 
         <!-- enable ribbon load balancer -->
@@ -41,18 +45,18 @@
     </route>
 
     <route>
-      <from uri="jetty:http://localhost:9096"/>
-      <to uri="mock:9096"/>
+      <from uri="jetty:http://localhost:{{firstPort}}"/>
+      <to uri="mock:{{firstPort}}"/>
       <transform>
-        <constant>9096</constant>
+        <constant>{{firstPort}}</constant>
       </transform>
     </route>
 
     <route>
-      <from uri="jetty:http://localhost:9097"/>
-      <to uri="mock:9097"/>
+      <from uri="jetty:http://localhost:{{secondPort}}"/>
+      <to uri="mock:{{secondPort}}"/>
       <transform>
-        <constant>9097</constant>
+        <constant>{{secondPort}}</constant>
       </transform>
     </route>
   </camelContext>
diff --git a/components/camel-ribbon/src/test/resources/springbeanribbonservicecallroutetest.properties b/components/camel-ribbon/src/test/resources/springbeanribbonservicecallroutetest.properties
new file mode 100644
index 0000000..6fc3357
--- /dev/null
+++ b/components/camel-ribbon/src/test/resources/springbeanribbonservicecallroutetest.properties
@@ -0,0 +1,19 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+firstPort=9092
+secondPort=9093
diff --git a/components/camel-ribbon/src/test/resources/springdslribbonpropertiesservicecallroutetest.properties b/components/camel-ribbon/src/test/resources/springdslribbonpropertiesservicecallroutetest.properties
new file mode 100644
index 0000000..3019581
--- /dev/null
+++ b/components/camel-ribbon/src/test/resources/springdslribbonpropertiesservicecallroutetest.properties
@@ -0,0 +1,19 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+firstPort=9094
+secondPort=9095
diff --git a/components/camel-ribbon/src/test/resources/springdslribbonservicecallroutetest.properties b/components/camel-ribbon/src/test/resources/springdslribbonservicecallroutetest.properties
new file mode 100644
index 0000000..e138a0a
--- /dev/null
+++ b/components/camel-ribbon/src/test/resources/springdslribbonservicecallroutetest.properties
@@ -0,0 +1,19 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+firstPort=9096
+secondPort=9097