sorry, i mean your unit test
On Wed, Aug 21, 2013 at 6:22 PM, Christian Posta <[email protected]>wrote: > post your route as a gist or pastebin and I will take a look for you > > > On Wed, Aug 21, 2013 at 4:37 PM, peacock.snowdrift < > [email protected]> wrote: > >> Hi, >> >> I'm trying to get an aggregator to work in Camel 2.11.0 and am >> experiencing >> difficulties in doing so. >> >> I have defined a main and error route. The main route looks like this: >> >> routeBuilder.from(input).routeId("Main") >> .onCompletion().beanRef("myStrategy", "setCompleted").end() >> >> .onException(Exception.class).maximumRedeliveries(0).handled(false).end() >> ... do stuff... >> >> The error route looks like this: >> >> routeBuilder >> .from(input) >> .aggregate(new MyStrategy()) >> .constant(true) >> .completionPredicate( >> new BeanExpression("myStrategy", "isCompleted")) >> ... do stuff... >> >> (I want to aggregate everything received in the error route, hence the >> ".constant(true)") >> >> The MyStrategy class implements AggregationStrategy and has a boolean >> field, >> default value false. This is set to true when setCompleted() is called. >> The >> isCompleted() method returns the value of the boolean field. >> >> I've written a JUnit test which includes a scenario where the error route >> is >> used. However, the setCompleted() method is never called so the test >> finishes without the aggregation completing. >> >> Thanks for any assistance. >> >> >> >> -- >> View this message in context: >> http://camel.465427.n5.nabble.com/aggregator-and-onCompletion-tp5737710.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> > > > > -- > *Christian Posta* > http://www.christianposta.com/blog > twitter: @christianposta > -- *Christian Posta* http://www.christianposta.com/blog twitter: @christianposta
