From b0544ba7bd13e24a449bb0ac7ace2bf2f839e147 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Fri, 15 Apr 2022 14:43:45 +0300 Subject: [PATCH] cql test env: Keep gossiper reference on board The reference is already available at the env initialization, but it's not kept on the env instance itself. Will be used by the next patch. Signed-off-by: Pavel Emelyanov --- test/lib/cql_test_env.cc | 11 +++++++++-- test/lib/cql_test_env.hh | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/test/lib/cql_test_env.cc b/test/lib/cql_test_env.cc index b84216295f..b62cea2192 100644 --- a/test/lib/cql_test_env.cc +++ b/test/lib/cql_test_env.cc @@ -130,6 +130,7 @@ private: sharded& _sl_controller; sharded& _mm; sharded& _batchlog_manager; + sharded& _gossiper; private: struct core_local_state { service::client_state client_state; @@ -178,7 +179,8 @@ public: sharded& mnotifier, sharded& mm, sharded &sl_controller, - sharded& batchlog_manager) + sharded& batchlog_manager, + sharded& gossiper) : _db(db) , _qp(qp) , _auth_service(auth_service) @@ -188,6 +190,7 @@ public: , _sl_controller(sl_controller) , _mm(mm) , _batchlog_manager(batchlog_manager) + , _gossiper(gossiper) { adjust_rlimit(); } @@ -399,6 +402,10 @@ public: return _batchlog_manager; } + virtual sharded& gossiper() override { + return _gossiper; + } + virtual future<> refresh_client_state() override { return _core_local.invoke_on_all([] (core_local_state& state) { return state.client_state.maybe_update_per_service_level_params(); @@ -809,7 +816,7 @@ public: // The default user may already exist if this `cql_test_env` is starting with previously populated data. } - single_node_cql_env env(db, qp, auth_service, view_builder, view_update_generator, mm_notif, mm, std::ref(sl_controller), bm); + single_node_cql_env env(db, qp, auth_service, view_builder, view_update_generator, mm_notif, mm, std::ref(sl_controller), bm, gossiper); env.start().get(); auto stop_env = defer([&env] { env.stop().get(); }); diff --git a/test/lib/cql_test_env.hh b/test/lib/cql_test_env.hh index 31d03f1743..ab96835899 100644 --- a/test/lib/cql_test_env.hh +++ b/test/lib/cql_test_env.hh @@ -159,6 +159,8 @@ public: virtual sharded& batchlog_manager() = 0; + virtual sharded& gossiper() = 0; + virtual future<> refresh_client_state() = 0; data_dictionary::database data_dictionary();