CAMEL-11862: Added unit test

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

Branch: refs/heads/camel-2.19.x
Commit: 80544f4d55b7ca8cced93cb3908ac8b04ddba86f
Parents: 6efb461
Author: Claus Ibsen <davscl...@apache.org>
Authored: Thu Sep 28 13:45:08 2017 +0200
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Thu Sep 28 14:20:14 2017 +0200

----------------------------------------------------------------------
 .../camel/component/seda/SedaConcurrentConsumersTest.java | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/80544f4d/camel-core/src/test/java/org/apache/camel/component/seda/SedaConcurrentConsumersTest.java
----------------------------------------------------------------------
diff --git 
a/camel-core/src/test/java/org/apache/camel/component/seda/SedaConcurrentConsumersTest.java
 
b/camel-core/src/test/java/org/apache/camel/component/seda/SedaConcurrentConsumersTest.java
index 75634e3..601cf84 100644
--- 
a/camel-core/src/test/java/org/apache/camel/component/seda/SedaConcurrentConsumersTest.java
+++ 
b/camel-core/src/test/java/org/apache/camel/component/seda/SedaConcurrentConsumersTest.java
@@ -19,12 +19,20 @@ package org.apache.camel.component.seda;
 import org.apache.camel.ContextTestSupport;
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.impl.JndiRegistry;
 
 /**
  * @version 
  */
 public class SedaConcurrentConsumersTest extends ContextTestSupport {
 
+    @Override
+    protected JndiRegistry createRegistry() throws Exception {
+        JndiRegistry jndi = super.createRegistry();
+        jndi.bind("count", "5");
+        return jndi;
+    }
+
     public void testSendToSeda() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
         mock.expectedBodiesReceived("Hello World");
@@ -39,7 +47,7 @@ public class SedaConcurrentConsumersTest extends 
ContextTestSupport {
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
-                from("seda:foo?concurrentConsumers=5").to("mock:result");
+                from("seda:foo?concurrentConsumers=#count").to("mock:result");
             }
         };
     }

Reply via email to