You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Ryan Moquin <fr...@gmail.com> on 2013/03/03 16:38:57 UTC

camel-test-blueprint mocking

/I had converted my camel routes from using camel-test to
camel-test-blueprint.  I switched to version 2.10.4 which prevents my camel
routes from being executed twice per test as I was seeing with
2.11.0-SNAPSHOT, but I've been having trouble with mocking an endpoint and
skipping sending to the original.with camel-test-blueprint.  I basically
just want to not have the ending http4 endpoint called.

Also, no matter what endpoint I mock, the most doesn't register any
received messages.  It always says it received 0 messages even though
messages were clearly sent to the original endpoint.  Is there somewhere I
can look where that test component is used?  Everything I've found seems to
use spring-dm instead...

Thanks for any help!

Ryan

Re: camel-test-blueprint mocking

Posted by Ryan Moquin <fr...@gmail.com>.
Yep, I'm doing thay all correctly.  I meant (and I probably didn't phrase
it right) that if you look at the bundled camel blueprint example, it
doesn't use the camel-test-blueprint component for testing, it actually
uses spring-dm rather than blueprint.  For example, the following test,
which according to the dir name is a blueprint example, is tested using
camel's spring test support:

...\apache-camel-2.11-SNAPSHOT\examples\camel-example-cxf-blueprint\src\test\java\org\apache\camel\example\reportincident\ReportIncidentRoutesClientTest.java

public class ReportIncidentRoutesClientTest extends CamelSpringTestSupport {
...

I was hoping to find a blueprint example that mocks an endpoint,  My
blueprint test runs fine, my mocks just don't register that they received
any messages.

Ryan




On Sun, Mar 3, 2013 at 10:24 PM, Willem jiang <wi...@gmail.com>wrote:

> If you are using camel-test-blueprint, it should have nothing to do with
> the spring-dm.
> Please make sure you are using camel-blueprint namespace to define the
> camel route.
>
>
> --
> Willem Jiang
>
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Web: http://www.fusesource.com | http://www.redhat.com
> Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/)
> (English)
>           http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
> Twitter: willemjiang
> Weibo: 姜宁willem
>
>
>
>
>
> On Sunday, March 3, 2013 at 11:38 PM, Ryan Moquin wrote:
>
> > /I had converted my camel routes from using camel-test to
> > camel-test-blueprint. I switched to version 2.10.4 which prevents my
> camel
> > routes from being executed twice per test as I was seeing with
> > 2.11.0-SNAPSHOT, but I've been having trouble with mocking an endpoint
> and
> > skipping sending to the original.with camel-test-blueprint. I basically
> > just want to not have the ending http4 endpoint called.
> >
> > Also, no matter what endpoint I mock, the most doesn't register any
> > received messages. It always says it received 0 messages even though
> > messages were clearly sent to the original endpoint. Is there somewhere I
> > can look where that test component is used? Everything I've found seems
> to
> > use spring-dm instead...
> >
> > Thanks for any help!
> >
> > Ryan
>
>
>

Re: camel-test-blueprint mocking

Posted by Willem jiang <wi...@gmail.com>.
If you are using camel-test-blueprint, it should have nothing to do with the spring-dm.
Please make sure you are using camel-blueprint namespace to define the camel route.


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Sunday, March 3, 2013 at 11:38 PM, Ryan Moquin wrote:

> /I had converted my camel routes from using camel-test to
> camel-test-blueprint. I switched to version 2.10.4 which prevents my camel
> routes from being executed twice per test as I was seeing with
> 2.11.0-SNAPSHOT, but I've been having trouble with mocking an endpoint and
> skipping sending to the original.with camel-test-blueprint. I basically
> just want to not have the ending http4 endpoint called.
>  
> Also, no matter what endpoint I mock, the most doesn't register any
> received messages. It always says it received 0 messages even though
> messages were clearly sent to the original endpoint. Is there somewhere I
> can look where that test component is used? Everything I've found seems to
> use spring-dm instead...
>  
> Thanks for any help!
>  
> Ryan