Return-Path: X-Original-To: apmail-camel-users-archive@www.apache.org Delivered-To: apmail-camel-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1133310F27 for ; Wed, 13 Nov 2013 09:21:58 +0000 (UTC) Received: (qmail 42100 invoked by uid 500); 13 Nov 2013 09:21:47 -0000 Delivered-To: apmail-camel-users-archive@camel.apache.org Received: (qmail 41864 invoked by uid 500); 13 Nov 2013 09:21:43 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Received: (qmail 41840 invoked by uid 99); 13 Nov 2013 09:21:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Nov 2013 09:21:40 +0000 X-ASF-Spam-Status: No, hits=2.3 required=5.0 tests=FORGED_YAHOO_RCVD,SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Nov 2013 09:21:35 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1VgWdP-0002rV-9Y for users@camel.apache.org; Wed, 13 Nov 2013 01:21:15 -0800 Date: Wed, 13 Nov 2013 01:21:15 -0800 (PST) From: cristisor To: users@camel.apache.org Message-ID: <1384334475270-5743163.post@n5.nabble.com> Subject: onCompletion not triggerd in testing MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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.