camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject git commit: CAMEL-7491 fixed the unit test error of SpringThrottlerTest
Date Wed, 11 Jun 2014 12:28:24 GMT
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 <willem.jiang@gmail.com>
Authored: Wed Jun 11 20:27:33 2014 +0800
Committer: Willem Jiang <willem.jiang@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>
 


Mime
View raw message