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 2017/05/16 10:50:11 UTC
[19/23] camel git commit: CAMEL-11279: Fixed test
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/a3060338
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/a3060338
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/a3060338
Branch: refs/heads/camel-2.19.x
Commit: a3060338952095f8793ddb3efaa10cd8b329ff6e
Parents: e925021
Author: Claus Ibsen <da...@apache.org>
Authored: Tue May 16 12:45:42 2017 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue May 16 12:45:42 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/a3060338/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