might help to show your whole test and route...

On Wed, Nov 13, 2013 at 1:21 AM, cristisor <[email protected]> wrote:
> Hello,
>
> I am using the following route:
>
>     protected void createRoute(Processor processor) {
>         from(getInputEndpoint())
>                 .onCompletion()
>                 .onCompleteOnly()
>                 .onWhen(customPredicate)
>                 .process(syncProcessor)
>                 .end()
>                 // the onCompletion callback ended and normal processing is
> back
>                 .choice()
>                 .when(customPredicate)
>                 .process(syncProcessor)
>                 .otherwise()
>                 .process(processor)
>                 .to(getOutputEndpoint())
>                 .end();
>     }
>
>
> and I need to do some processing inside the syncProcessor when some other
> messages have completed successfully. In deployment environment the route
> works fine but the unit tests are always failing because
> ".process(syncProcessor)" is never triggered.
>
> This is the outputEndpoint:
> @EndpointInject(uri = "mock:output")
> protected MockEndpoint resultEndpoint;
>
>
> Could it be that the "mock:output" is not triggering the onCompletion event?
>
> Thanks,
> Cristian.
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/onCompletion-not-triggerd-in-testing-tp5743163.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Christian Posta
http://www.christianposta.com/blog
twitter: @christianposta

Reply via email to