|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Problems Unit Testing Camel RoutesI was wondering if anyone has a solution to testing camel routes that end with an activemq endpoint. Specifically,
<route> <from ref="endpoint"/> ...some logic... <to ref="MyQueue"/> -> myQueue is a defined endpoint ...activemq:queue:myqueue/in in my actual code In my test code MyQueue is defined as mock ...mock:MyQueue </route> <route> <from ref="MyQueue"/> ...etc... </route> The problem I am having is that I am getting an error stating that I cannot consume from this endpoint. If I remove the second route I have no issues. I understand that this will not work with a mock, so I was wondering what the correct procedure would be to 'mock' out a queue |
|
|
Re: Problems Unit Testing Camel RoutesOn Thu, Jul 9, 2009 at 7:41 PM, Lotsa<nospam@...> wrote:
> > I was wondering if anyone has a solution to testing camel routes that end > with an activemq endpoint. Specifically, > > <route> > <from ref="endpoint"/> > ...some logic... > <to ref="MyQueue"/> -> myQueue is a defined endpoint > ...activemq:queue:myqueue/in in my actual code > In my test code MyQueue is defined as > mock ...mock:MyQueue > </route> > > <route> > <from ref="MyQueue"/> > ...etc... > </route> > > The problem I am having is that I am getting an error stating that I cannot > consume from this endpoint. If I remove the second route I have no issues. > I understand that this will not work with a mock, so I was wondering what > the correct procedure would be to 'mock' out a queue Instead of a JMS queue you should use seda instead. It behaves like a JMS queue but for intra JVM only. .to("seda:queue:foo") from("seda:queue:foo").to("mock:result"); > -- > View this message in context: http://www.nabble.com/Problems-Unit-Testing-Camel-Routes-tp24414728p24414728.html > Sent from the Camel - Users (activemq) mailing list archive at Nabble.com. > > -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus |
|
|
Re: Problems Unit Testing Camel RoutesSorry for the poor clarification...The reason I am using a JMS Queue is because I need to go across VMs
|
|
|
Re: Problems Unit Testing Camel RoutesNevermind...I was thinking clearly with your post...
My unit test will only run in one JVM so the seda queues will work perfectly... Claus Ibsen-2, you have been a great help!
|
|
|
Re: Problems Unit Testing Camel RoutesNevermind...I wasn't thinking clearly with your post...
My unit test will only run in one JVM so the seda queues will work perfectly... Claus Ibsen-2, you have been a great help!
|
| Free embeddable forum powered by Nabble | Forum Help |