From f3b63bfeff86f2d0bbfef8a8043f71eb37551355 Mon Sep 17 00:00:00 2001 From: Tomasz Grabiec Date: Tue, 11 Feb 2025 14:21:30 +0100 Subject: [PATCH] test: cql_test_env: Expose db config --- test/lib/cql_test_env.cc | 6 ++++++ test/lib/cql_test_env.hh | 2 ++ 2 files changed, 8 insertions(+) diff --git a/test/lib/cql_test_env.cc b/test/lib/cql_test_env.cc index a911f5811f..5eb72e0cae 100644 --- a/test/lib/cql_test_env.cc +++ b/test/lib/cql_test_env.cc @@ -168,6 +168,7 @@ private: sharded _gossip_address_map; sharded _fd_pinger; sharded _cdc; + db::config* _db_config; service::raft_group0_client* _group0_client; @@ -651,6 +652,7 @@ private: _lang_manager.invoke_on_all(&lang::manager::start).get(); + _db_config = &*cfg; _db.start(std::ref(*cfg), dbcfg, std::ref(_mnotifier), std::ref(_feature_service), std::ref(_token_metadata), std::ref(_cm), std::ref(_sstm), std::ref(_lang_manager), std::ref(_sst_dir_semaphore), std::ref(abort_sources), utils::cross_shard_barrier()).get(); auto stop_db = defer_verbose_shutdown("database", [this] { _db.stop().get(); @@ -1152,6 +1154,10 @@ public: virtual sharded& service_level_controller_service() override { return _sl_controller; } + + db::config& db_config() override { + return *_db_config; + } }; std::atomic single_node_cql_env::active = { false }; diff --git a/test/lib/cql_test_env.hh b/test/lib/cql_test_env.hh index dced13e400..934d4df7d5 100644 --- a/test/lib/cql_test_env.hh +++ b/test/lib/cql_test_env.hh @@ -194,6 +194,8 @@ public: data_dictionary::database data_dictionary(); virtual sharded& service_level_controller_service() = 0; + + virtual db::config& db_config() = 0; }; future<> do_with_cql_env(std::function(cql_test_env&)> func, cql_test_config = {}, std::optional = {});