You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2014/06/11 14:28:24 UTC
git commit: CAMEL-7491 fixed the unit test error of
SpringThrottlerTest
Repository: camel
Updated Branches:
refs/heads/master 6a02d8ebc -> 85f65613d
CAMEL-7491 fixed the unit test error of SpringThrottlerTest
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/85f65613
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/85f65613
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/85f65613
Branch: refs/heads/master
Commit: 85f65613d7330c396ccfe7277ea0864d9e75befe
Parents: 6a02d8e
Author: Willem Jiang <wi...@gmail.com>
Authored: Wed Jun 11 20:27:33 2014 +0800
Committer: Willem Jiang <wi...@gmail.com>
Committed: Wed Jun 11 20:27:33 2014 +0800
----------------------------------------------------------------------
.../org/apache/camel/spring/processor/throttler.xml | 15 +++++++++++++++
1 file changed, 15 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/85f65613/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/throttler.xml
----------------------------------------------------------------------
diff --git a/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/throttler.xml b/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/throttler.xml
index 60fc85d..157db1a 100644
--- a/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/throttler.xml
+++ b/components/camel-spring/src/test/resources/org/apache/camel/spring/processor/throttler.xml
@@ -23,6 +23,11 @@
">
<camelContext xmlns="http://camel.apache.org/schema/spring">
+ <onException>
+ <exception>java.util.concurrent.RejectedExecutionException</exception>
+ <handled><constant>true</constant></handled>
+ <to uri="mock:error"/>
+ </onException>
<!-- START SNIPPET: example -->
<route>
@@ -62,6 +67,16 @@
</throttle>
</route>
<!-- END SNIPPET: e2 -->
+
+ <route>
+ <from uri="direct:start"/>
+ <!-- throttle 2 messages per 10 sec -->
+ <throttle timePeriodMillis="10000" rejectExecution="true">
+ <constant>2</constant>
+ <to uri="mock:result"/>
+ </throttle>
+
+ </route>
</camelContext>