Hi Claus Thank you for your feedback.
Louis -----Original Message----- From: Claus Ibsen [mailto:[email protected]] Sent: 17 February 2019 11:52 AM To: [email protected] Subject: Re: @ExcludeRoutes not working Hi I logged a ticket and added support for using @ExcludeRoutes in Camel 2.24 and 3.0 onwards https://issues.apache.org/jira/browse/CAMEL-13210 On Sun, Feb 17, 2019 at 9:59 AM Claus Ibsen <[email protected]> wrote: > > Hi > > There is also a little example here > https://github.com/camelinaction/camelinaction2/tree/master/chapter9/s > pring-boot-test-one-route > > On Sun, Feb 17, 2019 at 9:54 AM Claus Ibsen <[email protected]> wrote: > > > > Hi > > > > Okay so that annotation @ExcludeRoutes is for non spring boot > > testing (eg old school spring apps). > > > > For spring-boot you need to use the java-routes-include-pattern and > > java-routes-exclude-pattern properties. > > > > These are documented a bit at > > https://github.com/apache/camel/blob/master/components/camel-spring- > > boot/src/main/docs/spring-boot.adoc > > > > On Wed, Feb 13, 2019 at 1:30 PM Louis Becker <[email protected]> wrote: > > > > > > Hi > > > > > > I am developing a camel 2.22.1 in spring using spring boot 2.0.7. > > > > > > I am trying to surprise "noisy" routes during testing, but it seems like > > > my @ExcludeRoutes array of classes is being ignored. I expect only on > > > route to run (see <code>), but as you will see from the extract from the > > > <log> that many of the listed routes still run. > > > > > > Can someone tell me what I should be doing differently? Google did not > > > help. > > > > > > Regards > > > Louis > > > > > > <code> > > > > > > @Slf4j > > > @ActiveProfiles("mock") > > > @RunWith(CamelSpringBootRunner.class) > > > @SpringBootTest > > > @DirtiesContext(classMode = > > > DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD) > > > @MockEndpoints > > > @ExcludeRoutes({ > > > EmydexSalesOrderOutputRoute.class, > > > SageX3SalesInvoiceInputRoute.class, > > > SageX3SalesOrderOutputRoute.class, > > > SalesInvoiceRouter.class, > > > SalesOrderRouter.class, > > > SavePrettyXmlRoute.class, > > > UpdateSageX3InvoiceSentStatusRoute.class, > > > WoermannSalesInvoiceOutputRoute.class, > > > WoermannSalesInvoiceOutputRoute.class, > > > WoermannSalesOrderInputRoute.class}) > > > public class PriceListOutputRouteMockTest { > > > > > > </code> > > > > > > <log> > > > 2019-02-13 14:23:09.135 INFO 13240 --- [ main] > > > o.a.camel.spring.SpringCamelContext : Route: route1 started and > > > consuming from: direct://emydexSalesOrderOutputRouteInput > > > 2019-02-13 14:23:09.135 INFO 13240 --- [ main] > > > o.a.camel.spring.SpringCamelContext : Route: route2 started and > > > consuming from: direct://priceListOutputRouteInput > > > 2019-02-13 14:23:09.135 INFO 13240 --- [ main] > > > o.a.camel.spring.SpringCamelContext : Route: route3 started and > > > consuming from: direct://sageX3SalesInvoiceInputRouteInput > > > 2019-02-13 14:23:09.135 INFO 13240 --- [ main] > > > o.a.camel.spring.SpringCamelContext : Route: route4 started and > > > consuming from: direct://sageX3SalesOrderOutputRouteInput > > > 2019-02-13 14:23:09.150 INFO 13240 --- [ main] > > > o.a.camel.spring.SpringCamelContext : Route: route5 started and > > > consuming from: direct://salesInvoiceRouterInput > > > 2019-02-13 14:23:09.150 INFO 13240 --- [ main] > > > o.a.camel.spring.SpringCamelContext : Route: route6 started and > > > consuming from: direct://salesOrderRouterInput > > > 2019-02-13 14:23:09.150 INFO 13240 --- [ main] > > > o.a.camel.spring.SpringCamelContext : Route: route7 started and > > > consuming from: direct://woermannCustomInvoiceSendRouteInput > > > </log> > > > > > > > > > > > > > > > -- > > Claus Ibsen > > ----------------- > > http://davsclaus.com @davsclaus > > Camel in Action 2: https://www.manning.com/ibsen2 > > > > -- > Claus Ibsen > ----------------- > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
