You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/04/21 12:00:57 UTC

[3/3] camel git commit: Polished

Polished


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

Branch: refs/heads/master
Commit: dc346d3455c1cc7366a86b47f0e88aada9f86a3d
Parents: 7b5ccff
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Apr 21 11:56:02 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Apr 21 12:00:45 2016 +0200

----------------------------------------------------------------------
 .../hystrix/processor/HystrixProcessorCommand.java       |  6 +++---
 .../HystrixProcessorCommandFallbackViaNetwork.java       |  6 +++---
 .../component/hystrix/processor/HystrixRouteOkTest.java  |  7 +++----
 .../src/main/java/sample/camel/ClientApplication.java    | 11 +++++++----
 .../src/main/java/sample/camel/Service1Application.java  |  2 +-
 .../src/main/java/sample/camel/Service2Application.java  |  5 +++++
 6 files changed, 22 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/dc346d34/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorCommand.java
----------------------------------------------------------------------
diff --git a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorCommand.java b/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorCommand.java
index 98c87ff..cbd6254 100644
--- a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorCommand.java
+++ b/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorCommand.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.

http://git-wip-us.apache.org/repos/asf/camel/blob/dc346d34/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorCommandFallbackViaNetwork.java
----------------------------------------------------------------------
diff --git a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorCommandFallbackViaNetwork.java b/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorCommandFallbackViaNetwork.java
index c565f9b..d3441f6 100644
--- a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorCommandFallbackViaNetwork.java
+++ b/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorCommandFallbackViaNetwork.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.

http://git-wip-us.apache.org/repos/asf/camel/blob/dc346d34/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixRouteOkTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixRouteOkTest.java b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixRouteOkTest.java
index 92faf79..4e03eec 100644
--- a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixRouteOkTest.java
+++ b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixRouteOkTest.java
@@ -24,9 +24,9 @@ public class HystrixRouteOkTest extends CamelTestSupport {
 
     @Test
     public void testHystrix() throws Exception {
-        getMockEndpoint("mock:result").expectedMinimumMessageCount(2);
+        getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
 
-//        template.sendBody("direct:start", "Hello World");
+        template.sendBody("direct:start", "Hello World");
 
         assertMockEndpointsSatisfied();
     }
@@ -36,8 +36,7 @@ public class HystrixRouteOkTest extends CamelTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("timer:trigger")
-                    .to("log:trigger")
+                from("direct:start")
                     .hystrix()
                         .to("direct:foo")
                         .to("log:foo")

http://git-wip-us.apache.org/repos/asf/camel/blob/dc346d34/examples/camel-example-hystrix/client/src/main/java/sample/camel/ClientApplication.java
----------------------------------------------------------------------
diff --git a/examples/camel-example-hystrix/client/src/main/java/sample/camel/ClientApplication.java b/examples/camel-example-hystrix/client/src/main/java/sample/camel/ClientApplication.java
index f5c3da8..574bb0b 100644
--- a/examples/camel-example-hystrix/client/src/main/java/sample/camel/ClientApplication.java
+++ b/examples/camel-example-hystrix/client/src/main/java/sample/camel/ClientApplication.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.
@@ -22,6 +22,9 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.context.embedded.ServletRegistrationBean;
 import org.springframework.context.annotation.Bean;
 
+/**
+ * A Spring Boot application that runs the Camel Hystrix client application that calls service 1 and service 2 (as fallback)
+ */
 @SpringBootApplication
 public class ClientApplication {
 
@@ -39,7 +42,7 @@ public class ClientApplication {
 
     @Bean
     public ServletRegistrationBean servletRegistrationBean() {
-        return new ServletRegistrationBean(new HystrixEventStreamServlet(),"/hystrix.stream");
+        return new ServletRegistrationBean(new HystrixEventStreamServlet(), "/hystrix.stream");
     }
 
 }

http://git-wip-us.apache.org/repos/asf/camel/blob/dc346d34/examples/camel-example-hystrix/service1/src/main/java/sample/camel/Service1Application.java
----------------------------------------------------------------------
diff --git a/examples/camel-example-hystrix/service1/src/main/java/sample/camel/Service1Application.java b/examples/camel-example-hystrix/service1/src/main/java/sample/camel/Service1Application.java
index 6a20e7b..b453a0b 100644
--- a/examples/camel-example-hystrix/service1/src/main/java/sample/camel/Service1Application.java
+++ b/examples/camel-example-hystrix/service1/src/main/java/sample/camel/Service1Application.java
@@ -21,7 +21,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
 
 //CHECKSTYLE:OFF
 /**
- * A Spring Boot application that starts the Camel Hystrix application.
+ * A Spring Boot application that runs Camel service 1
  */
 @SpringBootApplication
 public class Service1Application {

http://git-wip-us.apache.org/repos/asf/camel/blob/dc346d34/examples/camel-example-hystrix/service2/src/main/java/sample/camel/Service2Application.java
----------------------------------------------------------------------
diff --git a/examples/camel-example-hystrix/service2/src/main/java/sample/camel/Service2Application.java b/examples/camel-example-hystrix/service2/src/main/java/sample/camel/Service2Application.java
index 851f73d..943ec8a 100644
--- a/examples/camel-example-hystrix/service2/src/main/java/sample/camel/Service2Application.java
+++ b/examples/camel-example-hystrix/service2/src/main/java/sample/camel/Service2Application.java
@@ -18,6 +18,10 @@ package sample.camel;
 
 import org.apache.camel.main.Main;
 
+//CHECKSTYLE:OFF
+/**
+ * A Java main that runs Camel service 2
+ */
 public class Service2Application {
 
     public static void main(String[] args) throws Exception {
@@ -27,3 +31,4 @@ public class Service2Application {
     }
 
 }
+//CHECKSTYLE:ON
\ No newline at end of file