From c836e7940e6fded12e9babdbcd16e34c093382ca Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 12 Jul 2023 17:57:11 +0800 Subject: [PATCH] test: explicitly capture variables * sstable_expired_data_ratio: capture variables explictly for better readability. Signed-off-by: Kefu Chai --- test/boost/sstable_compaction_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/boost/sstable_compaction_test.cc b/test/boost/sstable_compaction_test.cc index 224a5a109c..f24f719f72 100644 --- a/test/boost/sstable_compaction_test.cc +++ b/test/boost/sstable_compaction_test.cc @@ -1657,7 +1657,7 @@ SEASTAR_TEST_CASE(sstable_expired_data_ratio) { // test ability of histogram to return a good estimation after merging keys. static int total_keys = std::ceil(sstables::TOMBSTONE_HISTOGRAM_BIN_SIZE/expired)*1.5; - auto insert_key = [&] (bytes k, uint32_t ttl, uint32_t expiration_time) { + auto insert_key = [&s, &mt] (bytes k, uint32_t ttl, uint32_t expiration_time) { auto key = partition_key::from_exploded(*s, {k}); mutation m(s, key); auto c_key = clustering_key::from_exploded(*s, {to_bytes("c1")}); @@ -1718,7 +1718,7 @@ SEASTAR_TEST_CASE(sstable_expired_data_ratio) { BOOST_REQUIRE(descriptor.sstables.front()->get_sstable_level() == 1U); // check tombstone compaction is disabled by default for TWCS - auto twcs_table = env.make_table_for_tests(make_schema(sstables::compaction_strategy_type::time_window)); + auto twcs_table = env.make_table_for_tests(make_schema("twcs", sstables::compaction_strategy_type::time_window)); auto close_twcs_table = deferred_stop(twcs_table); cs = sstables::make_compaction_strategy(sstables::compaction_strategy_type::time_window, {}); descriptor = cs.get_sstables_for_compaction(twcs_table.as_table_state(), *strategy_c, { sst });