shashank created CAMEL-26974:
--------------------------------
Summary: camel-zookeeper-master - a DST fake world for the master
consumer and the MasterRoutePolicy
Key: CAMEL-26974
URL: https://issues.apache.org/jira/browse/CAMEL-26974
Project: Camel
Issue Type: Improvement
Components: camel-test, camel-zookeeper-master
Reporter: shashank
Assignee: shashank
Part of CAMEL-26610 (tier 4). A fake world for the {{camel-zookeeper-master}}
master consumer and {{MasterRoutePolicy}}, following "Writing a fake world" in
{{test-dst.adoc}}.
The fake is a ZooKeeper ensemble behind the CuratorFramework the application
shares (the {{curator}} bean), so the real {{ZooKeeperGroup}} of the component
runs too. The other nodes of the group are sessions of the fake.
h3. What the world drives
* Leadership lost while the consumer starts: a connection loss (SUSPENDED,
RECONNECTED) or an expired session (LOST) during a start that takes long (with
the master consumer; the route policy starts its consumer while it holds its
leadership lock, which the one stack of the harness cannot run with a start
that takes time).
* The retry of a failed start of the consumer.
* Other nodes that join, leave or die, so that the leadership moves.
* Route stop and start (master consumer), and a route of the policy removed and
added again, or started from outside while it is stopped.
* A stopped consumer must not leave a listener on the shared CuratorFramework,
and no znode of the node must be left in the group after the final stop.
h3. Self-check
Candidates: CAMEL-25315 (master consumer: retry of a failed start, no start
after the leadership was lost), CAMEL-26540 (the same for the route policy),
CAMEL-26802 (a removed route gives up the mastership, a slave stays stopped),
CAMEL-26870 (a stopped consumer stayed a listener of the shared
CuratorFramework), CAMEL-26887 (a consumer closed a group factory it did not
create).
The fake follows the documentation of the external system (the ZooKeeper
Programmer's Guide and the Curator documentation), cited in the code. Per
CAMEL-26610, the world must reproduce at least one fixed bug on the code from
before its fix and pass on main. Marked with {{@DstWorld}} so the catalog and
the component page list it.
_Filed with Claude Code on behalf of allthingssecurity._
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)