Return-Path: Delivered-To: apmail-activemq-camel-user-archive@locus.apache.org Received: (qmail 59051 invoked from network); 15 Jan 2009 08:57:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Jan 2009 08:57:59 -0000 Received: (qmail 42646 invoked by uid 500); 15 Jan 2009 08:57:59 -0000 Delivered-To: apmail-activemq-camel-user-archive@activemq.apache.org Received: (qmail 42623 invoked by uid 500); 15 Jan 2009 08:57:58 -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 42612 invoked by uid 99); 15 Jan 2009 08:57:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jan 2009 00:57:58 -0800 X-ASF-Spam-Status: No, hits=0.2 required=10.0 tests=SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claus.ibsen@gmail.com designates 209.85.218.15 as permitted sender) Received: from [209.85.218.15] (HELO mail-bw0-f15.google.com) (209.85.218.15) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 15 Jan 2009 08:57:49 +0000 Received: by bwz8 with SMTP id 8so12941bwz.14 for ; Thu, 15 Jan 2009 00:57:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=544FwlTwlsEgMymZLEL3Gf0JTiZd88dPTupnCRyjYak=; b=b31OZCWQ4C6guyp/IbEc3cjyBDO4wiGVd1mSQ67F8BYC7rXTbeAF5pJHPliwOvIa5z Y+EIvVhtrmPx79u86pXixvuXz9PBh1q5OcLU0KupKSXBXnkz58eMTpo7l1ZnSFydrfc/ jpAKK7ZB5B6NGkwk/rsiHgzIfwCauox54y85s= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=a5Fp2gd0hn84DFOgulQcI3BLatRzDSnb5+GCIo/U/Pv2EaN0skYMf6dIq3qMqobXrl k2KL+PGd9+hjI/06HySQJ+zKTFiFYzrXxVlTz0seN9NSV7kWejI2RNwJyi1eRgbCvxEm vLwRqRsr4mRfOK4prHyti6teNxeeRdZn22Ce4= MIME-Version: 1.0 Received: by 10.223.108.74 with SMTP id e10mr1270826fap.35.1232009825503; Thu, 15 Jan 2009 00:57:05 -0800 (PST) In-Reply-To: <21473409.post@talk.nabble.com> References: <21453025.post@talk.nabble.com> <21457114.post@talk.nabble.com> <21458286.post@talk.nabble.com> <5380c69c0901142118m40d1602dw340c55a8f829cc9a@mail.gmail.com> <21473409.post@talk.nabble.com> Date: Thu, 15 Jan 2009 09:57:05 +0100 Message-ID: <5380c69c0901150057h6b6e6336pe5588db1a1380d2b@mail.gmail.com> Subject: Re: Reason why Mockendpoint generates an IndexOutOfBoundsException error ? From: Claus Ibsen To: camel-user@activemq.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Jan 15, 2009 at 9:38 AM, cmoulliard wrote: > > Hi, > > This should be interesting to add these(ose) remark(s) in the srping testing > wiki page. Dont you have wiki rights to edit :) > > > Claus Ibsen-2 wrote: >> >> Hi >> >> Yeah as James writes the expects *must* be set before you do start >> send exchanges into Camel. >> >> The send method is probably in a sync route so the exchange has >> finished routing when you in the next codeline set the expected body. >> >> >> On Wed, Jan 14, 2009 at 4:48 PM, James Strachan >> wrote: >>> 2009/1/14 cmoulliard : >>>> >>>> The error is solved. >>>> >>>> Question : >>>> >>>> Why the template.sendBody(Object) must be placed in the code after the >>>> MockEndpoint.expectedBodiesReceived() and not the inverse ? >>>> >>>> this code works : >>>> >>>> resultEndpoint.expectedBodiesReceived(result); >>>> template.sendBody(generateModel()); >>>> >>>> Not this one >>>> >>>> template.sendBody(generateModel() >>>> resultEndpoint.expectedBodiesReceived(result); >>> >>> Up to now we've been assuming you setup the expectations before >>> running your route. It could be MockEndpoint needs further patches to >>> ensure it can cope with expectations being added after messages arrive >>> on it >>> >>> -- >>> James >>> ------- >>> http://macstrac.blogspot.com/ >>> >>> Open Source Integration >>> http://fusesource.com/ >>> >> >> >> >> -- >> >> /Claus Ibsen >> Apache Camel Committer >> Blog: http://davsclaus.blogspot.com/ >> >> > > > ----- > Charles Moulliard > SOA Architect > > My Blog : http://cmoulliard.blogspot.com/ http://cmoulliard.blogspot.com/ > -- > View this message in context: http://www.nabble.com/Reason-why-Mockendpoint-generates-an-IndexOutOfBoundsException-error---tp21453025s22882p21473409.html > Sent from the Camel - Users mailing list archive at Nabble.com. > > -- /Claus Ibsen Apache Camel Committer Blog: http://davsclaus.blogspot.com/