I created an issue for this problem https://issues.apache.org/activemq/browse/CAMEL-2305
On Mon, 2009-12-14 at 10:28 -0800, Dragisa Krsmanovic wrote: > Here is more details. > > On Fri, 2009-12-11 at 10:42 -0800, Dragisa Krsmanovic wrote: > > @Test > > @DirtiesContext > > public void test() throws InterruptedException { > > endpoint.setResultWaitTime(10000l); > > endpoint.expectedMessageCount(1); > > endpoint.message(0).body().isEqualTo("foo/bar/"); > > inQueue.sendBody("foo"); > > inQueue.sendBody("bar"); > > start.sendBody("start"); > > endpoint.assertIsSatisfied(); > > } > > > > > > > It seems that scenario where a bean in one route consumes messages in > another queue fails with Camel + ActiveMQ 5.3.0 > > If I directly consume messages in my test method. The test will succeed. > > @Test > @DirtiesContext > public void test2() throws InterruptedException { > inQueue.sendBody("foo"); > inQueue.sendBody("bar"); > > Exchange exchange; > int count = 0; > while ((exchange = consumerTemplate.receive(inEndpoint, 2000l)) != > null) { > count++; > } > > assertEquals(count, 2); > > } > > -- Dragisa Krsmanovic Java Developer Public Library of Science http://www.plos.org -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This email is confidential to the intended recipient. If you have received it in error, please notify the sender and delete it from your system. Any unauthorized use, disclosure or copying is not permitted. The views or opinions presented are solely those of the sender and do not necessarily represent those of Public Library of Science unless otherwise specifically stated. Please note that neither Public Library of Science nor any of its agents accept any responsibility for any viruses that may be contained in this e-mail or its attachments and it is your responsibility to scan the e-mail and attachments (if any).