[
https://issues.apache.org/jira/browse/CAMEL-13666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alex Dettinger updated CAMEL-13666:
-----------------------------------
Description:
It looks like route autoStartup cancellation from a route policy is not working
properly with Camel 3.
For instance, ClusteredRoutePolicy.onInit() is [setting autoStartup to
false|https://github.com/apache/camel/blob/master/core/camel-core/src/main/java/org/apache/camel/impl/cluster/ClusteredRoutePolicy.java#L171],
but routes are actually started.
*How to reproduce:*
The test
[JGroupsRaftClusteredRoutePolicyTest|https://github.com/apache/camel/blob/master/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusteredRoutePolicyTest.java#L97]
reproduces this issue when autoStartup(false) is not explicitly set in
createRouteBuilder.
The test RoutePolicyAutoStartupCancelledOnInitTest is a small reproducer too.
was:
It looks like route autoStartup is not honoured when set from a route policy in
Camel 3.
For instance, ClusteredRoutePolicy.onInit() is [setting autoStartup to
false|https://github.com/apache/camel/blob/master/core/camel-core/src/main/java/org/apache/camel/impl/cluster/ClusteredRoutePolicy.java#L171],
but routes are actually started.
*How to reproduce:*
Remove the explicit autoStartup(false) statement in
[JGroupsRaftClusteredRoutePolicyTest|https://github.com/apache/camel/blob/master/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusteredRoutePolicyTest.java#L97].
Run the test, it will fail with java.lang.AssertionError: expected:<1> but
was:<3> as 3 routes are started while a single should be.
> Route autoStartup is not honoured when set from RoutePolicy.init()
> ------------------------------------------------------------------
>
> Key: CAMEL-13666
> URL: https://issues.apache.org/jira/browse/CAMEL-13666
> Project: Camel
> Issue Type: Bug
> Components: camel-core, camel-jgroups
> Affects Versions: 3.0.0-M3
> Reporter: Alex Dettinger
> Assignee: Alex Dettinger
> Priority: Major
> Time Spent: 10m
> Remaining Estimate: 0h
>
> It looks like route autoStartup cancellation from a route policy is not
> working properly with Camel 3.
> For instance, ClusteredRoutePolicy.onInit() is [setting autoStartup to
> false|https://github.com/apache/camel/blob/master/core/camel-core/src/main/java/org/apache/camel/impl/cluster/ClusteredRoutePolicy.java#L171],
> but routes are actually started.
> *How to reproduce:*
> The test
> [JGroupsRaftClusteredRoutePolicyTest|https://github.com/apache/camel/blob/master/components/camel-jgroups-raft/src/test/java/org/apache/camel/component/jgroups/raft/cluster/JGroupsRaftClusteredRoutePolicyTest.java#L97]
> reproduces this issue when autoStartup(false) is not explicitly set in
> createRouteBuilder.
> The test RoutePolicyAutoStartupCancelledOnInitTest is a small reproducer too.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)