1313#include " cloud_topics/level_zero/stm/ctp_stm.h"
1414#include " cloud_topics/level_zero/stm/ctp_stm_api.h"
1515#include " cloud_topics/logger.h"
16+ #include " features/feature_table.h"
1617#include " model/fundamental.h"
1718#include " raft/tests/raft_fixture.h"
1819#include " rpc/errc.h"
@@ -54,7 +55,14 @@ TEST_F_CORO(level_zero_notifier_fixture, replicate_to_leader_succeeds) {
5455 co_await wait_for_leader (raft::default_timeout ());
5556
5657 ct::level_zero_notifier notifier (
57- self_node, nullptr , nullptr , nullptr , nullptr , nullptr , tiny_backoff);
58+ self_node,
59+ nullptr ,
60+ nullptr ,
61+ nullptr ,
62+ nullptr ,
63+ nullptr ,
64+ nullptr ,
65+ tiny_backoff);
5866 auto leader_api = api (node (*get_leader ()));
5967 auto res = co_await notifier.replicate (
6068 test_ntp, leader_api, kafka::offset (42 ));
@@ -80,7 +88,14 @@ TEST_F_CORO(level_zero_notifier_fixture, gives_up_on_follower) {
8088 ASSERT_TRUE_CORO (follower != nullptr );
8189
8290 ct::level_zero_notifier notifier (
83- self_node, nullptr , nullptr , nullptr , nullptr , nullptr , tiny_backoff);
91+ self_node,
92+ nullptr ,
93+ nullptr ,
94+ nullptr ,
95+ nullptr ,
96+ nullptr ,
97+ nullptr ,
98+ tiny_backoff);
8499 auto follower_api = api (*follower);
85100 auto res = co_await notifier.replicate (
86101 test_ntp, follower_api, kafka::offset (7 ));
@@ -89,6 +104,38 @@ TEST_F_CORO(level_zero_notifier_fixture, gives_up_on_follower) {
89104 ASSERT_FALSE_CORO (res.has_value ());
90105}
91106
107+ // While the tiered_cloud_topics feature is not active, notification attempts
108+ // are no-ops that report success without touching any of the notifier's
109+ // dependencies (all null here, so reaching past the gate would crash).
110+ TEST_F_CORO (
111+ level_zero_notifier_fixture, notification_is_noop_until_feature_active) {
112+ ss::sharded<features::feature_table> features;
113+ co_await features.start ();
114+
115+ ct::level_zero_notifier notifier (
116+ self_node,
117+ nullptr ,
118+ nullptr ,
119+ nullptr ,
120+ nullptr ,
121+ nullptr ,
122+ &features,
123+ tiny_backoff);
124+ const model::topic_id_partition tidp (
125+ model::topic_id (), model::partition_id (0 ));
126+
127+ auto res = co_await notifier.set_min_allowed_local_threshold (
128+ tidp, kafka::offset (42 ));
129+ ASSERT_TRUE_CORO (res.has_value ());
130+
131+ auto local_res = co_await notifier.set_min_allowed_local_threshold_locally (
132+ tidp, kafka::offset (42 ));
133+ ASSERT_TRUE_CORO (local_res.has_value ());
134+
135+ co_await notifier.stop ();
136+ co_await features.stop ();
137+ }
138+
92139TEST (level_zero_notifier_routing, map_transport_error) {
93140 using ct::notifier_detail::map_transport_error;
94141 EXPECT_EQ (
0 commit comments