camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lburgazz...@apache.org
Subject [7/8] camel git commit: Fix tests
Date Mon, 24 Apr 2017 17:00:01 GMT
Fix tests


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/f08a3005
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/f08a3005
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/f08a3005

Branch: refs/heads/master
Commit: f08a3005f3061b11b9405cd4e6dfb32ef80c5aaa
Parents: 419cbdc
Author: lburgazzoli <lburgazzoli@gmail.com>
Authored: Mon Apr 24 18:53:28 2017 +0200
Committer: lburgazzoli <lburgazzoli@gmail.com>
Committed: Mon Apr 24 18:53:28 2017 +0200

----------------------------------------------------------------------
 .../component/jetty/cloud/JettyServiceCallRouteTest.java     | 8 ++++----
 .../netty4/http/cloud/Netty4HttpServiceCallRouteTest.java    | 8 ++++----
 .../component/ribbon/cloud/RibbonServiceDefinition.java      | 6 ++++--
 .../camel/component/ribbon/cloud/RibbonServerListTest.java   | 2 +-
 .../ribbon/cloud/RibbonServiceCallRouteDslTest.java          | 4 ++--
 .../undertow/cloud/UndertowServiceCallRouteTest.java         | 8 ++++----
 6 files changed, 19 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/f08a3005/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/cloud/JettyServiceCallRouteTest.java
----------------------------------------------------------------------
diff --git a/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/cloud/JettyServiceCallRouteTest.java
b/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/cloud/JettyServiceCallRouteTest.java
index de57a14..4f3d43c 100644
--- a/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/cloud/JettyServiceCallRouteTest.java
+++ b/components/camel-jetty9/src/test/java/org/apache/camel/component/jetty/cloud/JettyServiceCallRouteTest.java
@@ -51,16 +51,16 @@ public class JettyServiceCallRouteTest extends CamelTestSupport {
                         .name("myService")
                         .component("jetty")
                         .staticServiceDiscovery()
-                            .server("myService@localhost:8081")
-                            .server("myService@localhost:8082")
+                            .servers("myService@localhost:8081")
+                            .servers("myService@localhost:8082")
                         .endParent();
 
                 from("direct:default")
                     .serviceCall()
                         .name("myService")
                         .staticServiceDiscovery()
-                            .server("myService@localhost:8081")
-                            .server("myService@localhost:8082")
+                            .servers("myService@localhost:8081")
+                            .servers("myService@localhost:8082")
                         .endParent();
 
                 from("jetty:http://localhost:8081")

http://git-wip-us.apache.org/repos/asf/camel/blob/f08a3005/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/cloud/Netty4HttpServiceCallRouteTest.java
----------------------------------------------------------------------
diff --git a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/cloud/Netty4HttpServiceCallRouteTest.java
b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/cloud/Netty4HttpServiceCallRouteTest.java
index 0a610e8..c1cb4ef 100644
--- a/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/cloud/Netty4HttpServiceCallRouteTest.java
+++ b/components/camel-netty4-http/src/test/java/org/apache/camel/component/netty4/http/cloud/Netty4HttpServiceCallRouteTest.java
@@ -51,16 +51,16 @@ public class Netty4HttpServiceCallRouteTest extends CamelTestSupport {
                         .name("myService")
                         .component("netty4-http")
                         .staticServiceDiscovery()
-                            .server("myService@localhost:8081")
-                            .server("myService@localhost:8082")
+                            .servers("myService@localhost:8081")
+                            .servers("myService@localhost:8082")
                         .endParent();
 
                 from("direct:default")
                     .serviceCall()
                         .name("myService")
                         .staticServiceDiscovery()
-                            .server("myService@localhost:8081")
-                            .server("myService@localhost:8082")
+                            .servers("myService@localhost:8081")
+                            .servers("myService@localhost:8082")
                         .endParent();
 
                 from("netty4-http:http://localhost:8081")

http://git-wip-us.apache.org/repos/asf/camel/blob/f08a3005/components/camel-ribbon/src/main/java/org/apache/camel/component/ribbon/cloud/RibbonServiceDefinition.java
----------------------------------------------------------------------
diff --git a/components/camel-ribbon/src/main/java/org/apache/camel/component/ribbon/cloud/RibbonServiceDefinition.java
b/components/camel-ribbon/src/main/java/org/apache/camel/component/ribbon/cloud/RibbonServiceDefinition.java
index a7415ee..37098af 100644
--- a/components/camel-ribbon/src/main/java/org/apache/camel/component/ribbon/cloud/RibbonServiceDefinition.java
+++ b/components/camel-ribbon/src/main/java/org/apache/camel/component/ribbon/cloud/RibbonServiceDefinition.java
@@ -28,12 +28,14 @@ import org.apache.camel.impl.cloud.DefaultServiceHealth;
 import org.apache.camel.util.ObjectHelper;
 
 public class RibbonServiceDefinition extends Server implements ServiceDefinition {
+    private static final ServiceHealth DEFAULT_SERVICE_HEALTH = new DefaultServiceHealth();
+
     private String name;
     private ServiceHealth health;
     private Map<String, String> metaData;
 
     public RibbonServiceDefinition(String name, String host, int port) {
-        this(name, host, port, null, DefaultServiceHealth.INSTANCE);
+        this(name, host, port, null, DEFAULT_SERVICE_HEALTH);
     }
 
     public RibbonServiceDefinition(String name, String host, int port, ServiceHealth healt)
{
@@ -41,7 +43,7 @@ public class RibbonServiceDefinition extends Server implements ServiceDefinition
     }
 
     public RibbonServiceDefinition(String name, String host, int port,  Map<String, String>
meta) {
-        this(name, host, port, meta, DefaultServiceHealth.INSTANCE);
+        this(name, host, port, meta, DEFAULT_SERVICE_HEALTH);
     }
 
     public RibbonServiceDefinition(String name, String host, int port, Map<String, String>
meta, ServiceHealth healt) {

http://git-wip-us.apache.org/repos/asf/camel/blob/f08a3005/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/RibbonServerListTest.java
----------------------------------------------------------------------
diff --git a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/RibbonServerListTest.java
b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/RibbonServerListTest.java
index a1f9c54..59cb4e0 100644
--- a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/RibbonServerListTest.java
+++ b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/RibbonServerListTest.java
@@ -37,7 +37,7 @@ public class RibbonServerListTest {
                     new RibbonServiceDefinition("unknown", "localhost", 9090),
                     new RibbonServiceDefinition("unknown", "localhost", 9091)
                 ),
-                PassThroughServiceFilter.INSTANCE))
+                new PassThroughServiceFilter()))
             .withRule(new RoundRobinRule())
             .buildDynamicServerListLoadBalancer();
 

http://git-wip-us.apache.org/repos/asf/camel/blob/f08a3005/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/RibbonServiceCallRouteDslTest.java
----------------------------------------------------------------------
diff --git a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/RibbonServiceCallRouteDslTest.java
b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/RibbonServiceCallRouteDslTest.java
index f59379c..0a077be 100644
--- a/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/RibbonServiceCallRouteDslTest.java
+++ b/components/camel-ribbon/src/test/java/org/apache/camel/component/ribbon/cloud/RibbonServiceCallRouteDslTest.java
@@ -47,8 +47,8 @@ public class RibbonServiceCallRouteDslTest extends CamelTestSupport {
                         .component("jetty")
                         .ribbonLoadBalancer()
                         .staticServiceDiscovery()
-                            .server("localhost:9090")
-                            .server("localhost:9091")
+                            .servers("localhost:9090")
+                            .servers("localhost:9091")
                         .endParent()
                     .to("mock:result");
                 from("jetty:http://localhost:9090")

http://git-wip-us.apache.org/repos/asf/camel/blob/f08a3005/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/cloud/UndertowServiceCallRouteTest.java
----------------------------------------------------------------------
diff --git a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/cloud/UndertowServiceCallRouteTest.java
b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/cloud/UndertowServiceCallRouteTest.java
index bab5b55..0b499c0 100644
--- a/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/cloud/UndertowServiceCallRouteTest.java
+++ b/components/camel-undertow/src/test/java/org/apache/camel/component/undertow/cloud/UndertowServiceCallRouteTest.java
@@ -51,16 +51,16 @@ public class UndertowServiceCallRouteTest extends CamelTestSupport {
                         .name("myService")
                         .component("undertow")
                         .staticServiceDiscovery()
-                            .server("myService@localhost:8081")
-                            .server("myService@localhost:8082")
+                            .servers("myService@localhost:8081")
+                            .servers("myService@localhost:8082")
                         .endParent();
 
                 from("direct:default")
                     .serviceCall()
                         .name("myService")
                         .staticServiceDiscovery()
-                            .server("myService@localhost:8081")
-                            .server("myService@localhost:8082")
+                            .servers("myService@localhost:8081")
+                            .servers("myService@localhost:8082")
                         .endParent();
 
                 from("undertow:http://localhost:8081")


Mime
View raw message