camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aldettin...@apache.org
Subject [camel] branch master updated: Fixed CS in camel-consul
Date Sun, 03 Jun 2018 15:28:56 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new 9d51f04  Fixed CS in camel-consul
9d51f04 is described below

commit 9d51f043a10f10acb39bc0ed93387172105d5257
Author: aldettinger <aldettinger@gmail.com>
AuthorDate: Sun Jun 3 17:27:12 2018 +0200

    Fixed CS in camel-consul
---
 .../consul/cloud/ConsulServiceCallWithRegistrationTest.java    |  2 +-
 .../component/consul/cloud/ConsulServiceDiscoveryTest.java     |  2 +-
 .../consul/cloud/ConsulServiceRegistrationTestBase.java        |  8 ++++----
 .../ConsulServiceRegistrationWithServiceComponentTest.java     | 10 ++++++----
 .../consul/cloud/SpringConsulServiceCallRouteTest.java         |  5 +++--
 .../consul/cluster/ConsulClusteredRoutePolicyFactoryTest.java  |  7 ++++---
 .../consul/cluster/ConsulClusteredRoutePolicyTest.java         |  7 ++++---
 .../camel/component/consul/cluster/ConsulMasterTest.java       |  7 ++++---
 .../component/consul/support/ConsulContainerWaitStrategy.java  |  6 +++---
 .../camel/component/consul/support/ConsulTestSupport.java      |  1 -
 10 files changed, 30 insertions(+), 25 deletions(-)

diff --git a/components/camel-consul/src/test/java/org/apache/camel/component/consul/cloud/ConsulServiceCallWithRegistrationTest.java
b/components/camel-consul/src/test/java/org/apache/camel/component/consul/cloud/ConsulServiceCallWithRegistrationTest.java
index 2bbd547..1141c27 100644
--- a/components/camel-consul/src/test/java/org/apache/camel/component/consul/cloud/ConsulServiceCallWithRegistrationTest.java
+++ b/components/camel-consul/src/test/java/org/apache/camel/component/consul/cloud/ConsulServiceCallWithRegistrationTest.java
@@ -28,7 +28,7 @@ import org.junit.Test;
 import org.springframework.util.SocketUtils;
 
 public class ConsulServiceCallWithRegistrationTest extends ConsulTestSupport {
-    private final static String SERVICE_HOST = "localhost";
+    private static final String SERVICE_HOST = "localhost";
 
     // ******************************
     // Setup / tear down
diff --git a/components/camel-consul/src/test/java/org/apache/camel/component/consul/cloud/ConsulServiceDiscoveryTest.java
b/components/camel-consul/src/test/java/org/apache/camel/component/consul/cloud/ConsulServiceDiscoveryTest.java
index b7a6945..5f3a62d 100644
--- a/components/camel-consul/src/test/java/org/apache/camel/component/consul/cloud/ConsulServiceDiscoveryTest.java
+++ b/components/camel-consul/src/test/java/org/apache/camel/component/consul/cloud/ConsulServiceDiscoveryTest.java
@@ -100,7 +100,7 @@ public class ConsulServiceDiscoveryTest extends ConsulTestSupport {
             assertTrue(service.getMetadata().containsKey("a-tag"));
             assertTrue(service.getMetadata().containsKey("key1"));
             assertTrue(service.getMetadata().containsKey("key2"));
-            assertEquals("" + service.getHealth().isHealthy() , service.getMetadata().get("healthy"));
+            assertEquals("" + service.getHealth().isHealthy(), service.getMetadata().get("healthy"));
         }
     }
 }
diff --git a/components/camel-consul/src/test/java/org/apache/camel/component/consul/cloud/ConsulServiceRegistrationTestBase.java
b/components/camel-consul/src/test/java/org/apache/camel/component/consul/cloud/ConsulServiceRegistrationTestBase.java
index c1a97e4..69a4e1e 100644
--- a/components/camel-consul/src/test/java/org/apache/camel/component/consul/cloud/ConsulServiceRegistrationTestBase.java
+++ b/components/camel-consul/src/test/java/org/apache/camel/component/consul/cloud/ConsulServiceRegistrationTestBase.java
@@ -32,10 +32,10 @@ import org.junit.Test;
 import org.springframework.util.SocketUtils;
 
 public abstract class ConsulServiceRegistrationTestBase extends ConsulTestSupport {
-    protected final static String SERVICE_ID = UUID.randomUUID().toString();
-    protected final static String SERVICE_NAME = "my-service";
-    protected final static String SERVICE_HOST = "localhost";
-    protected final static int SERVICE_PORT = SocketUtils.findAvailableTcpPort();
+    protected static final String SERVICE_ID = UUID.randomUUID().toString();
+    protected static final String SERVICE_NAME = "my-service";
+    protected static final String SERVICE_HOST = "localhost";
+    protected static final int SERVICE_PORT = SocketUtils.findAvailableTcpPort();
 
     protected Map<String, String> getMetadata() {
         return Collections.emptyMap();
diff --git a/components/camel-consul/src/test/java/org/apache/camel/component/consul/cloud/ConsulServiceRegistrationWithServiceComponentTest.java
b/components/camel-consul/src/test/java/org/apache/camel/component/consul/cloud/ConsulServiceRegistrationWithServiceComponentTest.java
index d12dce3..f038921 100644
--- a/components/camel-consul/src/test/java/org/apache/camel/component/consul/cloud/ConsulServiceRegistrationWithServiceComponentTest.java
+++ b/components/camel-consul/src/test/java/org/apache/camel/component/consul/cloud/ConsulServiceRegistrationWithServiceComponentTest.java
@@ -27,10 +27,12 @@ import org.apache.camel.impl.JndiRegistry;
 public class ConsulServiceRegistrationWithServiceComponentTest extends ConsulServiceRegistrationTestBase
{
 
     protected Map<String, String> getMetadata() {
-        return new HashMap<String, String>() {{
-            put("service.type", "consul");
-            put("service.zone", "US");
-        }};
+        return new HashMap<String, String>() {
+            {
+                put("service.type", "consul");
+                put("service.zone", "US");
+            }
+        };
     }
 
     @Override
diff --git a/components/camel-consul/src/test/java/org/apache/camel/component/consul/cloud/SpringConsulServiceCallRouteTest.java
b/components/camel-consul/src/test/java/org/apache/camel/component/consul/cloud/SpringConsulServiceCallRouteTest.java
index 6d8d6d6..471a9fa 100644
--- a/components/camel-consul/src/test/java/org/apache/camel/component/consul/cloud/SpringConsulServiceCallRouteTest.java
+++ b/components/camel-consul/src/test/java/org/apache/camel/component/consul/cloud/SpringConsulServiceCallRouteTest.java
@@ -40,12 +40,13 @@ import org.junit.Test;
 import org.testcontainers.containers.GenericContainer;
 
 public abstract class SpringConsulServiceCallRouteTest extends CamelSpringTestSupport {
-    private AgentClient client;
-    private List<Registration> registrations;
 
     @Rule
     public GenericContainer container = ConsulContainerSupport.consulContainer();
 
+    private AgentClient client;
+    private List<Registration> registrations;
+
     // *************************************************************************
     // Setup / tear down
     // *************************************************************************
diff --git a/components/camel-consul/src/test/java/org/apache/camel/component/consul/cluster/ConsulClusteredRoutePolicyFactoryTest.java
b/components/camel-consul/src/test/java/org/apache/camel/component/consul/cluster/ConsulClusteredRoutePolicyFactoryTest.java
index c87efb1..43ced2d 100644
--- a/components/camel-consul/src/test/java/org/apache/camel/component/consul/cluster/ConsulClusteredRoutePolicyFactoryTest.java
+++ b/components/camel-consul/src/test/java/org/apache/camel/component/consul/cluster/ConsulClusteredRoutePolicyFactoryTest.java
@@ -38,15 +38,16 @@ import org.slf4j.LoggerFactory;
 import org.testcontainers.containers.GenericContainer;
 
 public class ConsulClusteredRoutePolicyFactoryTest {
+
+    @ClassRule
+    public static GenericContainer container = ConsulContainerSupport.consulContainer();
+
     private static final Logger LOGGER = LoggerFactory.getLogger(ConsulClusteredRoutePolicyFactoryTest.class);
     private static final List<String> CLIENTS = IntStream.range(0, 3).mapToObj(Integer::toString).collect(Collectors.toList());
     private static final List<String> RESULTS = new ArrayList<>();
     private static final ScheduledExecutorService SCHEDULER = Executors.newScheduledThreadPool(CLIENTS.size()
* 2);
     private static final CountDownLatch LATCH = new CountDownLatch(CLIENTS.size());
 
-    @ClassRule
-    public static GenericContainer container = ConsulContainerSupport.consulContainer();
-
     // ************************************
     // Test
     // ************************************
diff --git a/components/camel-consul/src/test/java/org/apache/camel/component/consul/cluster/ConsulClusteredRoutePolicyTest.java
b/components/camel-consul/src/test/java/org/apache/camel/component/consul/cluster/ConsulClusteredRoutePolicyTest.java
index 45aea5f..c2c3b16 100644
--- a/components/camel-consul/src/test/java/org/apache/camel/component/consul/cluster/ConsulClusteredRoutePolicyTest.java
+++ b/components/camel-consul/src/test/java/org/apache/camel/component/consul/cluster/ConsulClusteredRoutePolicyTest.java
@@ -38,15 +38,16 @@ import org.slf4j.LoggerFactory;
 import org.testcontainers.containers.GenericContainer;
 
 public class ConsulClusteredRoutePolicyTest {
+
+    @ClassRule
+    public static GenericContainer container = ConsulContainerSupport.consulContainer();
+
     private static final Logger LOGGER = LoggerFactory.getLogger(ConsulClusteredRoutePolicyTest.class);
     private static final List<String> CLIENTS = IntStream.range(0, 3).mapToObj(Integer::toString).collect(Collectors.toList());
     private static final List<String> RESULTS = new ArrayList<>();
     private static final ScheduledExecutorService SCHEDULER = Executors.newScheduledThreadPool(CLIENTS.size()
* 2);
     private static final CountDownLatch LATCH = new CountDownLatch(CLIENTS.size());
 
-    @ClassRule
-    public static GenericContainer container = ConsulContainerSupport.consulContainer();
-
     // ************************************
     // Test
     // ************************************
diff --git a/components/camel-consul/src/test/java/org/apache/camel/component/consul/cluster/ConsulMasterTest.java
b/components/camel-consul/src/test/java/org/apache/camel/component/consul/cluster/ConsulMasterTest.java
index b223afb..9a88469 100644
--- a/components/camel-consul/src/test/java/org/apache/camel/component/consul/cluster/ConsulMasterTest.java
+++ b/components/camel-consul/src/test/java/org/apache/camel/component/consul/cluster/ConsulMasterTest.java
@@ -37,15 +37,16 @@ import org.slf4j.LoggerFactory;
 import org.testcontainers.containers.GenericContainer;
 
 public class ConsulMasterTest {
+
+    @ClassRule
+    public static GenericContainer container = ConsulContainerSupport.consulContainer();
+
     private static final Logger LOGGER = LoggerFactory.getLogger(ConsulMasterTest.class);
     private static final List<String> CLIENTS = IntStream.range(0, 3).mapToObj(Integer::toString).collect(Collectors.toList());
     private static final List<String> RESULTS = new ArrayList<>();
     private static final ScheduledExecutorService SCHEDULER = Executors.newScheduledThreadPool(CLIENTS.size()
* 2);
     private static final CountDownLatch LATCH = new CountDownLatch(CLIENTS.size());
 
-    @ClassRule
-    public static GenericContainer container = ConsulContainerSupport.consulContainer();
-
     // ************************************
     // Test
     // ************************************
diff --git a/components/camel-consul/src/test/java/org/apache/camel/component/consul/support/ConsulContainerWaitStrategy.java
b/components/camel-consul/src/test/java/org/apache/camel/component/consul/support/ConsulContainerWaitStrategy.java
index c17cb7c..8742f3e 100644
--- a/components/camel-consul/src/test/java/org/apache/camel/component/consul/support/ConsulContainerWaitStrategy.java
+++ b/components/camel-consul/src/test/java/org/apache/camel/component/consul/support/ConsulContainerWaitStrategy.java
@@ -5,9 +5,9 @@
  * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
+ *
+ *      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.
diff --git a/components/camel-consul/src/test/java/org/apache/camel/component/consul/support/ConsulTestSupport.java
b/components/camel-consul/src/test/java/org/apache/camel/component/consul/support/ConsulTestSupport.java
index 890b98f..8c93800 100644
--- a/components/camel-consul/src/test/java/org/apache/camel/component/consul/support/ConsulTestSupport.java
+++ b/components/camel-consul/src/test/java/org/apache/camel/component/consul/support/ConsulTestSupport.java
@@ -23,7 +23,6 @@ import java.util.UUID;
 import com.orbitz.consul.Consul;
 import com.orbitz.consul.KeyValueClient;
 import org.apache.camel.component.consul.ConsulComponent;
-import org.apache.camel.component.consul.support.ConsulContainerSupport;
 import org.apache.camel.impl.JndiRegistry;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Rule;

-- 
To stop receiving notification emails like this one, please contact
aldettinger@apache.org.

Mime
View raw message