camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [22/23] camel git commit: CAMEL-11279: Fixed test
Date Tue, 16 May 2017 10:50:14 GMT
CAMEL-11279: Fixed test


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

Branch: refs/heads/master
Commit: d4d2a75abfad5114f6f97500245403ecbc6b41ee
Parents: d72352b
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Tue May 16 12:45:42 2017 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Tue May 16 12:49:03 2017 +0200

----------------------------------------------------------------------
 .../component/hystrix/processor/HystrixCircuitOpenTest.java  | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d4d2a75a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixCircuitOpenTest.java
----------------------------------------------------------------------
diff --git a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixCircuitOpenTest.java
b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixCircuitOpenTest.java
index 6312056..616f828 100644
--- a/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixCircuitOpenTest.java
+++ b/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixCircuitOpenTest.java
@@ -52,6 +52,11 @@ public class HystrixCircuitOpenTest extends CamelTestSupport {
         }
         Thread.sleep(1500);
 
+        resetMocks();
+
+        // notice this can be flaky due timing when using thread sleeps in unit tests
+        getMockEndpoint("mock:result").expectedPropertyReceived(HYSTRIX_RESPONSE_SHORT_CIRCUITED,
true);
+
         route.throwException = false;
         try {
             template.requestBody("direct:start", "Request Body");
@@ -60,9 +65,6 @@ public class HystrixCircuitOpenTest extends CamelTestSupport {
             LOG.info("Circuit open expected ", e);
         }
 
-        // notice this can be flaky due timing when using thread sleeps in unit tests
-        getMockEndpoint("mock:result").expectedPropertyReceived(HYSTRIX_RESPONSE_SHORT_CIRCUITED,
true);
-
         assertMockEndpointsSatisfied();
 
         // wait for the circuit to try an other request


Mime
View raw message