camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cristisor <cristisor...@yahoo.com>
Subject onCompletion not triggerd in testing
Date Wed, 13 Nov 2013 09:21:15 GMT
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.

Mime
View raw message