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 2015/04/02 10:11:15 UTC

[1/5] camel git commit: CAMEL-8591: Upgrade to restlet 2.3.1

Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x ec663813e -> 54c63fc3b
  refs/heads/master d85f2f0c5 -> 1669aa0c2


CAMEL-8591: Upgrade to restlet 2.3.1


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

Branch: refs/heads/master
Commit: 1669aa0c25578a95662e3e2c38258d32e6bd749d
Parents: dd0f74c
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Apr 2 10:10:57 2015 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Apr 2 10:11:45 2015 +0200

----------------------------------------------------------------------
 .../org/apache/camel/component/restlet/DefaultRestletBinding.java  | 2 +-
 parent/pom.xml                                                     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/1669aa0c/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
----------------------------------------------------------------------
diff --git a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
index 35369bf..3d8df74 100644
--- a/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
+++ b/components/camel-restlet/src/main/java/org/apache/camel/component/restlet/DefaultRestletBinding.java
@@ -47,12 +47,12 @@ import org.restlet.data.ChallengeResponse;
 import org.restlet.data.ChallengeScheme;
 import org.restlet.data.CharacterSet;
 import org.restlet.data.Form;
+import org.restlet.data.Header;
 import org.restlet.data.MediaType;
 import org.restlet.data.Method;
 import org.restlet.data.Preference;
 import org.restlet.data.Status;
 import org.restlet.engine.application.DecodeRepresentation;
-import org.restlet.engine.header.Header;
 import org.restlet.engine.header.HeaderConstants;
 import org.restlet.representation.FileRepresentation;
 import org.restlet.representation.InputRepresentation;

http://git-wip-us.apache.org/repos/asf/camel/blob/1669aa0c/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index b701214..80b0174 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -394,7 +394,7 @@
     <rabbitmq-amqp-client-version>3.3.4</rabbitmq-amqp-client-version>
     <reflections-bundle-version>0.9.8_1</reflections-bundle-version>
     <regexp-bundle-version>1.4_1</regexp-bundle-version>
-    <restlet-version>2.2.3</restlet-version>
+    <restlet-version>2.3.1</restlet-version>
     <rhino-bundle-version>1.7R2_3</rhino-bundle-version>
     <rhino-version>1.7R2</rhino-version>
     <rome-bundle-version>1.0_3</rome-bundle-version>


[4/5] camel git commit: CAMEL-8584 Update half-open test to assert circuit stays open during halfOpenAfter period

Posted by da...@apache.org.
CAMEL-8584 Update half-open test to assert circuit stays open during
halfOpenAfter period


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

Branch: refs/heads/camel-2.15.x
Commit: 89928ff13348148e456e5e4d4ad551d54d785ddb
Parents: ec66381
Author: jack.perrett <ja...@gamesys.co.uk>
Authored: Wed Apr 1 12:55:16 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Apr 2 10:13:31 2015 +0200

----------------------------------------------------------------------
 .../processor/CircuitBreakerLoadBalancerTest.java | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/89928ff1/camel-core/src/test/java/org/apache/camel/processor/CircuitBreakerLoadBalancerTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/processor/CircuitBreakerLoadBalancerTest.java b/camel-core/src/test/java/org/apache/camel/processor/CircuitBreakerLoadBalancerTest.java
index 2644240..3607ae8 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/CircuitBreakerLoadBalancerTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/CircuitBreakerLoadBalancerTest.java
@@ -102,17 +102,17 @@ public class CircuitBreakerLoadBalancerTest extends ContextTestSupport {
         assertTrue(exchangeThree.getException() instanceof RejectedExecutionException);
     }
     
-    public void testHalfOpenAfterMessageThreeSync() throws Exception {
+    public void testHalfOpenAfterTimeoutSync() throws Exception {
         String endpoint = "direct:start";
-        halfOpenAfterMessageThree(endpoint);
+        halfOpenAfterTimeout(endpoint);
     }
     
-    public void testHalfOpenAfterMessageThreeAsync() throws Exception {
+    public void testHalfOpenAfterTimeoutAsync() throws Exception {
         String endpoint = "direct:start-async";
-        halfOpenAfterMessageThree(endpoint);
+        halfOpenAfterTimeout(endpoint);
     }
     
-    private void halfOpenAfterMessageThree(String endpoint) throws InterruptedException, Exception {
+    private void halfOpenAfterTimeout(String endpoint) throws InterruptedException, Exception {
         expectsMessageCount(2, result);
 
         result.whenAnyExchangeReceived(new Processor() {
@@ -125,6 +125,7 @@ public class CircuitBreakerLoadBalancerTest extends ContextTestSupport {
         Exchange exchangeOne = sendMessage(endpoint, "message one");
         Exchange exchangeTwo = sendMessage(endpoint, "message two");
         Exchange exchangeThree = sendMessage(endpoint, "message three");
+        Exchange exchangeFour = sendMessage(endpoint, "message four");
         assertMockEndpointsSatisfied();
         Thread.sleep(1000);
         result.reset();
@@ -135,15 +136,16 @@ public class CircuitBreakerLoadBalancerTest extends ContextTestSupport {
             }
         });
         expectsMessageCount(1, result);
-        Exchange exchangeFour = sendMessage(endpoint, "message four");
         Exchange exchangeFive = sendMessage(endpoint, "message five");
+        Exchange exchangeSix = sendMessage(endpoint, "message six");
         assertMockEndpointsSatisfied();
         
         assertTrue(exchangeOne.getException() instanceof MyCustomException);
         assertTrue(exchangeTwo.getException() instanceof MyCustomException);
         assertTrue(exchangeThree.getException() instanceof RejectedExecutionException);
-        assertTrue(exchangeFour.getException() instanceof MyCustomException);
-        assertTrue(exchangeFive.getException() instanceof RejectedExecutionException);
+        assertTrue(exchangeFour.getException() instanceof RejectedExecutionException);
+        assertTrue(exchangeFive.getException() instanceof MyCustomException);
+        assertTrue(exchangeSix.getException() instanceof RejectedExecutionException);
     }
     
     public void testHalfOpenToCloseTransitionSync() throws Exception {


[3/5] camel git commit: CAMEL-8584 Update half-open test to assert circuit stays open during halfOpenAfter period

Posted by da...@apache.org.
CAMEL-8584 Update half-open test to assert circuit stays open during
halfOpenAfter period


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

Branch: refs/heads/master
Commit: 323ab6bd5c9c0ef1abab610270343d00f77ec6c6
Parents: d85f2f0
Author: jack.perrett <ja...@gamesys.co.uk>
Authored: Wed Apr 1 12:55:16 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Apr 2 10:11:45 2015 +0200

----------------------------------------------------------------------
 .../processor/CircuitBreakerLoadBalancerTest.java | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/323ab6bd/camel-core/src/test/java/org/apache/camel/processor/CircuitBreakerLoadBalancerTest.java
----------------------------------------------------------------------
diff --git a/camel-core/src/test/java/org/apache/camel/processor/CircuitBreakerLoadBalancerTest.java b/camel-core/src/test/java/org/apache/camel/processor/CircuitBreakerLoadBalancerTest.java
index 2644240..3607ae8 100644
--- a/camel-core/src/test/java/org/apache/camel/processor/CircuitBreakerLoadBalancerTest.java
+++ b/camel-core/src/test/java/org/apache/camel/processor/CircuitBreakerLoadBalancerTest.java
@@ -102,17 +102,17 @@ public class CircuitBreakerLoadBalancerTest extends ContextTestSupport {
         assertTrue(exchangeThree.getException() instanceof RejectedExecutionException);
     }
     
-    public void testHalfOpenAfterMessageThreeSync() throws Exception {
+    public void testHalfOpenAfterTimeoutSync() throws Exception {
         String endpoint = "direct:start";
-        halfOpenAfterMessageThree(endpoint);
+        halfOpenAfterTimeout(endpoint);
     }
     
-    public void testHalfOpenAfterMessageThreeAsync() throws Exception {
+    public void testHalfOpenAfterTimeoutAsync() throws Exception {
         String endpoint = "direct:start-async";
-        halfOpenAfterMessageThree(endpoint);
+        halfOpenAfterTimeout(endpoint);
     }
     
-    private void halfOpenAfterMessageThree(String endpoint) throws InterruptedException, Exception {
+    private void halfOpenAfterTimeout(String endpoint) throws InterruptedException, Exception {
         expectsMessageCount(2, result);
 
         result.whenAnyExchangeReceived(new Processor() {
@@ -125,6 +125,7 @@ public class CircuitBreakerLoadBalancerTest extends ContextTestSupport {
         Exchange exchangeOne = sendMessage(endpoint, "message one");
         Exchange exchangeTwo = sendMessage(endpoint, "message two");
         Exchange exchangeThree = sendMessage(endpoint, "message three");
+        Exchange exchangeFour = sendMessage(endpoint, "message four");
         assertMockEndpointsSatisfied();
         Thread.sleep(1000);
         result.reset();
@@ -135,15 +136,16 @@ public class CircuitBreakerLoadBalancerTest extends ContextTestSupport {
             }
         });
         expectsMessageCount(1, result);
-        Exchange exchangeFour = sendMessage(endpoint, "message four");
         Exchange exchangeFive = sendMessage(endpoint, "message five");
+        Exchange exchangeSix = sendMessage(endpoint, "message six");
         assertMockEndpointsSatisfied();
         
         assertTrue(exchangeOne.getException() instanceof MyCustomException);
         assertTrue(exchangeTwo.getException() instanceof MyCustomException);
         assertTrue(exchangeThree.getException() instanceof RejectedExecutionException);
-        assertTrue(exchangeFour.getException() instanceof MyCustomException);
-        assertTrue(exchangeFive.getException() instanceof RejectedExecutionException);
+        assertTrue(exchangeFour.getException() instanceof RejectedExecutionException);
+        assertTrue(exchangeFive.getException() instanceof MyCustomException);
+        assertTrue(exchangeSix.getException() instanceof RejectedExecutionException);
     }
     
     public void testHalfOpenToCloseTransitionSync() throws Exception {


[2/5] camel git commit: CAMEL-8584 Ensure circuit stays open during halfOpenAfter period

Posted by da...@apache.org.
CAMEL-8584 Ensure circuit stays open during halfOpenAfter period


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

Branch: refs/heads/master
Commit: dd0f74c002d57b5b2f4da446b67d4194301c6335
Parents: 323ab6b
Author: jack.perrett <ja...@gamesys.co.uk>
Authored: Wed Apr 1 14:48:39 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Apr 2 10:11:45 2015 +0200

----------------------------------------------------------------------
 .../processor/loadbalancer/CircuitBreakerLoadBalancer.java      | 5 -----
 1 file changed, 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/dd0f74c0/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/CircuitBreakerLoadBalancer.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/CircuitBreakerLoadBalancer.java b/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/CircuitBreakerLoadBalancer.java
index f760311..645b477 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/CircuitBreakerLoadBalancer.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/CircuitBreakerLoadBalancer.java
@@ -200,11 +200,6 @@ public class CircuitBreakerLoadBalancer extends LoadBalancerSupport implements T
 
     private boolean rejectExchange(final Exchange exchange, final AsyncCallback callback) {
         exchange.setException(new RejectedExecutionException("CircuitBreaker Open: failures: " + failures + ", lastFailure: " + lastFailure));
-        /*
-         * If the circuit opens, we have to prevent the execution of any
-         * processor. The failures count can be set to 0.
-         */
-        failures.set(0);
         callback.done(true);
         return true;
     }


[5/5] camel git commit: CAMEL-8584 Ensure circuit stays open during halfOpenAfter period

Posted by da...@apache.org.
CAMEL-8584 Ensure circuit stays open during halfOpenAfter period


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

Branch: refs/heads/camel-2.15.x
Commit: 54c63fc3beb9f63149f2b668f4bdb4b280b519cf
Parents: 89928ff
Author: jack.perrett <ja...@gamesys.co.uk>
Authored: Wed Apr 1 14:48:39 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Apr 2 10:13:38 2015 +0200

----------------------------------------------------------------------
 .../processor/loadbalancer/CircuitBreakerLoadBalancer.java      | 5 -----
 1 file changed, 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/54c63fc3/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/CircuitBreakerLoadBalancer.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/CircuitBreakerLoadBalancer.java b/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/CircuitBreakerLoadBalancer.java
index f760311..645b477 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/CircuitBreakerLoadBalancer.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/loadbalancer/CircuitBreakerLoadBalancer.java
@@ -200,11 +200,6 @@ public class CircuitBreakerLoadBalancer extends LoadBalancerSupport implements T
 
     private boolean rejectExchange(final Exchange exchange, final AsyncCallback callback) {
         exchange.setException(new RejectedExecutionException("CircuitBreaker Open: failures: " + failures + ", lastFailure: " + lastFailure));
-        /*
-         * If the circuit opens, we have to prevent the execution of any
-         * processor. The failures count can be set to 0.
-         */
-        failures.set(0);
         callback.done(true);
         return true;
     }