From 0ff10c72dec04e62a772ed304bee4017d4a04f4b Mon Sep 17 00:00:00 2001 From: Tomasz Grabiec Date: Fri, 6 Oct 2023 22:25:52 +0200 Subject: [PATCH] tests: cql_test_env: Register storage_service in migration notifier The procedure in main already does this. Processing of tablet metadata on schema changes relies on this. Without this, creating a tablet-based table will fail on missing tablet map in token metadata because the listener in storage service does not fire. --- test/lib/cql_test_env.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/lib/cql_test_env.cc b/test/lib/cql_test_env.cc index d37e801d48..8e70ac3412 100644 --- a/test/lib/cql_test_env.cc +++ b/test/lib/cql_test_env.cc @@ -749,6 +749,11 @@ private: std::ref(_cdc_generation_service)).get(); auto stop_storage_service = defer([this] { _ss.stop().get(); }); + _mnotifier.local().register_listener(&_ss.local()); + auto stop_mm_listener = defer([this] { + _mnotifier.local().unregister_listener(&_ss.local()).get(); + }); + _ss.invoke_on_all([this] (service::storage_service& ss) { ss.set_query_processor(_qp.local()); }).get();