Repository: camel Updated Branches: refs/heads/master 75d90c6f8 -> a85bc0054
Fix tests Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/a85bc005 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a85bc005 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a85bc005 Branch: refs/heads/master Commit: a85bc005400d000cdf9efd1cf791d3e2f0ead12e Parents: 75d90c6 Author: lburgazzoli <lburgazz...@gmail.com> Authored: Wed Feb 22 09:48:13 2017 +0100 Committer: lburgazzoli <lburgazz...@gmail.com> Committed: Wed Feb 22 09:48:47 2017 +0100 ---------------------------------------------------------------------- .../spring/cloud/CamelCloudDiscoveryClient.java | 2 +- ...lCloudServiceDiscoveryAutoConfiguration.java | 2 +- .../CamelCloudServiceCallConfiguration.java | 49 -------------------- .../CamelCloudServiceCallConfigurationTest.java | 2 +- .../cloud/CamelCloudServiceCallRibbonTest.java | 2 +- ...CloudServiceCallRoutesAutoConfiguration.java | 47 +++++++++++++++++++ .../spring/cloud/CamelCloudServiceCallTest.java | 2 +- 7 files changed, 52 insertions(+), 54 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/a85bc005/components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelCloudDiscoveryClient.java ---------------------------------------------------------------------- diff --git a/components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelCloudDiscoveryClient.java b/components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelCloudDiscoveryClient.java index 5ffd6c1..3b8c627 100644 --- a/components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelCloudDiscoveryClient.java +++ b/components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelCloudDiscoveryClient.java @@ -35,7 +35,7 @@ public class CamelCloudDiscoveryClient implements DiscoveryClient { this(description, null, serviceDiscovery); } - public CamelCloudDiscoveryClient(String description, ServiceInstance localServiceDiscovery,ServiceDiscovery serviceDiscovery) { + public CamelCloudDiscoveryClient(String description, ServiceInstance localServiceDiscovery, ServiceDiscovery serviceDiscovery) { this.description = description; this.serviceDiscovery = serviceDiscovery; this.localInstance = localServiceDiscovery; http://git-wip-us.apache.org/repos/asf/camel/blob/a85bc005/components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelCloudServiceDiscoveryAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelCloudServiceDiscoveryAutoConfiguration.java b/components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelCloudServiceDiscoveryAutoConfiguration.java index 3581b5b..aee96b3 100644 --- a/components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelCloudServiceDiscoveryAutoConfiguration.java +++ b/components/camel-spring-cloud/src/main/java/org/apache/camel/spring/cloud/CamelCloudServiceDiscoveryAutoConfiguration.java @@ -52,7 +52,7 @@ public class CamelCloudServiceDiscoveryAutoConfiguration { @Lazy @Bean(name = "service-discovery") public CamelCloudServiceDiscovery serviceDiscovery( - CamelContext camelContext, CamelCloudConfigurationProperties properties, List<ServiceDiscovery> serviceDiscoveryList) throws NoTypeConversionAvailableException{ + CamelContext camelContext, CamelCloudConfigurationProperties properties, List<ServiceDiscovery> serviceDiscoveryList) throws NoTypeConversionAvailableException { String cacheTimeout = properties.getServiceDiscovery().getCacheTimeout(); Long timeout = null; http://git-wip-us.apache.org/repos/asf/camel/blob/a85bc005/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallConfiguration.java b/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallConfiguration.java deleted file mode 100644 index e45e25c..0000000 --- a/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallConfiguration.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 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. - */ - -package org.apache.camel.spring.cloud; - -import org.apache.camel.builder.RouteBuilder; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -@Configuration -public class CamelCloudServiceCallConfiguration { - @Bean - public RouteBuilder myRouteBuilder() { - return new RouteBuilder() { - @Override - public void configure() throws Exception { - from("direct:start") - .serviceCall() - .name("custom-svc-list/hello"); - - from("jetty:http://localhost:9090/hello") - .transform() - .constant("9090"); - from("jetty:http://localhost:9091/hello") - .transform() - .constant("9091"); - from("jetty:http://localhost:9092/hello") - .transform() - .constant("9092"); - } - }; - } -} - - http://git-wip-us.apache.org/repos/asf/camel/blob/a85bc005/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallConfigurationTest.java ---------------------------------------------------------------------- diff --git a/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallConfigurationTest.java b/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallConfigurationTest.java index a5d9a79..42c821a 100644 --- a/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallConfigurationTest.java +++ b/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallConfigurationTest.java @@ -37,7 +37,7 @@ import static org.junit.Assert.assertTrue; @DirtiesContext @RunWith(SpringRunner.class) -@SpringBootApplication +@SpringBootApplication() @SpringBootTest( classes = { CamelAutoConfiguration.class, http://git-wip-us.apache.org/repos/asf/camel/blob/a85bc005/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallRibbonTest.java ---------------------------------------------------------------------- diff --git a/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallRibbonTest.java b/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallRibbonTest.java index c80489e..01fb0c6 100644 --- a/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallRibbonTest.java +++ b/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallRibbonTest.java @@ -35,7 +35,7 @@ import org.springframework.test.context.junit4.SpringRunner; classes = { CamelAutoConfiguration.class, CamelCloudAutoConfiguration.class, - CamelCloudServiceCallConfiguration.class + CamelCloudServiceCallRoutesAutoConfiguration.class }, properties = { "ribbon.eureka.enabled=false", http://git-wip-us.apache.org/repos/asf/camel/blob/a85bc005/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallRoutesAutoConfiguration.java ---------------------------------------------------------------------- diff --git a/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallRoutesAutoConfiguration.java b/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallRoutesAutoConfiguration.java new file mode 100644 index 0000000..ed5bb63 --- /dev/null +++ b/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallRoutesAutoConfiguration.java @@ -0,0 +1,47 @@ +/** + * 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. + */ + +package org.apache.camel.spring.cloud; + +import org.apache.camel.builder.RouteBuilder; +import org.springframework.context.annotation.Bean; + +public class CamelCloudServiceCallRoutesAutoConfiguration { + @Bean + public RouteBuilder myRouteBuilder() { + return new RouteBuilder() { + @Override + public void configure() throws Exception { + from("direct:start") + .serviceCall() + .name("custom-svc-list/hello"); + + from("jetty:http://localhost:9090/hello") + .transform() + .constant("9090"); + from("jetty:http://localhost:9091/hello") + .transform() + .constant("9091"); + from("jetty:http://localhost:9092/hello") + .transform() + .constant("9092"); + } + }; + } +} + + http://git-wip-us.apache.org/repos/asf/camel/blob/a85bc005/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallTest.java ---------------------------------------------------------------------- diff --git a/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallTest.java b/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallTest.java index 333561c..d793f3c 100644 --- a/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallTest.java +++ b/components/camel-spring-cloud/src/test/java/org/apache/camel/spring/cloud/CamelCloudServiceCallTest.java @@ -35,7 +35,7 @@ import org.springframework.test.context.junit4.SpringRunner; classes = { CamelAutoConfiguration.class, CamelCloudAutoConfiguration.class, - CamelCloudServiceCallConfiguration.class + CamelCloudServiceCallRoutesAutoConfiguration.class }, properties = { "camel.cloud.load-balancer.enabled=false",