Return-Path: Delivered-To: apmail-activemq-camel-user-archive@locus.apache.org Received: (qmail 82911 invoked from network); 1 Oct 2008 19:06:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Oct 2008 19:06:22 -0000 Received: (qmail 6002 invoked by uid 500); 1 Oct 2008 19:06:21 -0000 Delivered-To: apmail-activemq-camel-user-archive@activemq.apache.org Received: (qmail 5982 invoked by uid 500); 1 Oct 2008 19:06:21 -0000 Mailing-List: contact camel-user-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: camel-user@activemq.apache.org Delivered-To: mailing list camel-user@activemq.apache.org Received: (qmail 5971 invoked by uid 99); 1 Oct 2008 19:06:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 12:06:20 -0700 X-ASF-Spam-Status: No, hits=3.2 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.162.183] (HELO el-out-1112.google.com) (209.85.162.183) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Oct 2008 19:05:16 +0000 Received: by el-out-1112.google.com with SMTP id m34so145419ele.5 for ; Wed, 01 Oct 2008 12:05:39 -0700 (PDT) Received: by 10.142.242.11 with SMTP id p11mr3504924wfh.198.1222887938880; Wed, 01 Oct 2008 12:05:38 -0700 (PDT) Received: by 10.143.14.8 with HTTP; Wed, 1 Oct 2008 12:05:38 -0700 (PDT) Message-ID: <56b1dfc30810011205j7adab77s7a08c79819768803@mail.gmail.com> Date: Wed, 1 Oct 2008 12:05:38 -0700 From: "Mick Knutson" To: camel-user@activemq.apache.org Subject: Re: issue routing Exchange to custom method in Processor In-Reply-To: <56b1dfc30810011202s66dbe021s6d2139d7ce1095b1@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_63644_13755017.1222887938873" References: <56b1dfc30809301239l792c9a06n51cbb959abe1ef03@mail.gmail.com> <4C1FB9C00D24A140906239533638C4D2058FB2C2@EXVS04.exserver.dk> <56b1dfc30810011202s66dbe021s6d2139d7ce1095b1@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_63644_13755017.1222887938873 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline It almost appears that there might be some issue with mock endpoint resetting? On Wed, Oct 1, 2008 at 12:02 PM, Mick Knutson wrote= : > I am going crazy here (literally). > > This is all I know at this point. > > If I use this method exacly as I have it (endpoint names), then all my > tests pass as expected. But if I change anything in the endpoint names, e= ven > to be mock:success, verse mock:success1 then several of my tests fail wit= h > messages not getting routed correctly: > > *public void testCreateInvalidChangeRequest(String > inputDestinationURI, > String messageInputBody, > String messageOutputBody > ) > throws Exception { > > MockEndpoint mockFailureEndpoint =3D getMockEndpoint("mock:failed= 1 > "); > MockEndpoint mockSuccessEndpoint =3D getMockEndpoint("mock:succes= s1 > "); > > mockFailureEndpoint.expectedBodiesReceived(messageInputBody); > mockFailureEndpoint.expectedMessageCount(1); > mockSuccessEndpoint.expectedMessageCount(0); > > try { > camelContext.addRoutes(new RouteBuilder() { > public void configure() throws Exception { > from("direct:start1") > .errorHandler(deadLetterChannel("mock:failed1 > ")) > .process(changeRequestProcessor) > .to("mock:success1"); > } > }); > > producerTemplate.sendBody("direct:start1", messageInputBody); > > Assert.fail("Should have thrown a RuntimeCamelException"); > } catch (RuntimeCamelException e) { > //assertIsInstanceOf(e, IllegalArgumentException.class); > assertIsInstanceOf(e, RuntimeCamelException.class); > } > > testMocksAreValid(); > > MockEndpoint.assertIsSatisfied(mockFailureEndpoint, > mockSuccessEndpoint); > > } > * > > I have attached my basetest, and this test in question as well. > --=20 --- Thank You=85 Mick Knutson BASE Logic, inc. (415) 354-4215 Website: http://baselogic.com Blog: http://baselogic.com/blog BLiNC Magazine: http://blincmagazine.com Linked IN: http://linkedin.com/in/mickknutson DJ Mick: http://djmick.com MySpace: http://myspace.com/mickknutson Vacation Rental: http://tahoe.baselogic.com ------=_Part_63644_13755017.1222887938873--