From 2ee026f26f07ee56ebb12e01e8fa56ddf5de7d2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Botond=20D=C3=A9nes?= Date: Mon, 31 Aug 2020 16:54:07 +0300 Subject: [PATCH] test/manual/sstable_scan_footprint_test: run test body in statement sched group So that queries are processed in said scheduling group and thus they use the user read concurrency semaphore. --- test/manual/sstable_scan_footprint_test.cc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/test/manual/sstable_scan_footprint_test.cc b/test/manual/sstable_scan_footprint_test.cc index 6f1356e942..bc8d882316 100644 --- a/test/manual/sstable_scan_footprint_test.cc +++ b/test/manual/sstable_scan_footprint_test.cc @@ -317,8 +317,14 @@ int main(int argc, char** argv) { testing::local_random_engine.seed(std::random_device()()); return app.run(argc, argv, [] { + return async([] { cql_test_config test_cfg; + test_cfg.dbcfg.emplace(); + test_cfg.dbcfg->available_memory = memory::stats().total_memory(); + test_cfg.dbcfg->statement_scheduling_group = seastar::create_scheduling_group("statement", 1000).get0(); + test_cfg.dbcfg->streaming_scheduling_group = seastar::create_scheduling_group("streaming", 200).get0(); + auto& db_cfg = *test_cfg.db_config; db_cfg.enable_cache(app.configuration().contains("enable-cache")); @@ -339,8 +345,13 @@ int main(int argc, char** argv) { throw std::runtime_error(format("Unsupported sstable format: {}", sstable_format_name)); } - return do_with_cql_env_thread([] (cql_test_env& env) { - test_main_thread(env); - }, test_cfg); + do_with_cql_env([] (cql_test_env& env) { + return with_scheduling_group(env.local_db().get_statement_scheduling_group(), [&] { + return seastar::async([&] { + test_main_thread(env); + }); + }); + }, test_cfg).get(); + }); }); }