From 8d5d05012e12ed9b5f63a8a328e1257dbddbb222 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Wed, 30 Nov 2022 12:09:05 +0300 Subject: [PATCH] sstable_3_x_test: Indentation fix after previous patch Signed-off-by: Pavel Emelyanov --- test/boost/sstable_3_x_test.cc | 68 +++++++++++++++------------------- 1 file changed, 30 insertions(+), 38 deletions(-) diff --git a/test/boost/sstable_3_x_test.cc b/test/boost/sstable_3_x_test.cc index decb82e682..58e7b17b72 100644 --- a/test/boost/sstable_3_x_test.cc +++ b/test/boost/sstable_3_x_test.cc @@ -5195,19 +5195,17 @@ static void test_sstable_write_large_row_f(schema_ptr s, reader_permit permit, r large_row_handler handler(threshold, std::numeric_limits::max(), std::numeric_limits::max(), std::numeric_limits::max(), f); sstables::test_env::do_with_async([&] (auto& env) { + test_db_config.host_id = locator::host_id::create_random_id(); + tmpdir dir; + auto sst = env.manager().make_sstable( + s, dir.path().string(), generation_from_value(1), version, sstables::sstable::format_types::big); - test_db_config.host_id = locator::host_id::create_random_id(); - tmpdir dir; - auto sst = env.manager().make_sstable( - s, dir.path().string(), generation_from_value(1), version, sstables::sstable::format_types::big); - - // The test provides thresholds values for the large row handler. Whether the handler gets - // trigger depends on the size of rows after they are written in the MC format and that size - // depends on the encoding statistics (because of variable-length encoding). The original values - // were chosen with the default-constructed encoding_stats, so let's keep it that way. - sst->write_components(mt.make_flat_reader(s, std::move(permit)), 1, s, env.manager().configure_writer("test"), encoding_stats{}).get(); - BOOST_REQUIRE_EQUAL(i, expected.size()); - + // The test provides thresholds values for the large row handler. Whether the handler gets + // trigger depends on the size of rows after they are written in the MC format and that size + // depends on the encoding statistics (because of variable-length encoding). The original values + // were chosen with the default-constructed encoding_stats, so let's keep it that way. + sst->write_components(mt.make_flat_reader(s, std::move(permit)), 1, s, env.manager().configure_writer("test"), encoding_stats{}).get(); + BOOST_REQUIRE_EQUAL(i, expected.size()); }, { &handler }).get(); } @@ -5254,19 +5252,17 @@ static void test_sstable_write_large_cell_f(schema_ptr s, reader_permit permit, large_row_handler handler(std::numeric_limits::max(), std::numeric_limits::max(), threshold, std::numeric_limits::max(), f); sstables::test_env::do_with_async([&] (auto& env) { + test_db_config.host_id = locator::host_id::create_random_id(); + tmpdir dir; + auto sst = env.manager().make_sstable( + s, dir.path().string(), generation_from_value(1), version, sstables::sstable::format_types::big); - test_db_config.host_id = locator::host_id::create_random_id(); - tmpdir dir; - auto sst = env.manager().make_sstable( - s, dir.path().string(), generation_from_value(1), version, sstables::sstable::format_types::big); - - // The test provides thresholds values for the large row handler. Whether the handler gets - // trigger depends on the size of rows after they are written in the MC format and that size - // depends on the encoding statistics (because of variable-length encoding). The original values - // were chosen with the default-constructed encoding_stats, so let's keep it that way. - sst->write_components(mt.make_flat_reader(s, std::move(permit)), 1, s, env.manager().configure_writer("test"), encoding_stats{}).get(); - BOOST_REQUIRE_EQUAL(i, expected.size()); - + // The test provides thresholds values for the large row handler. Whether the handler gets + // trigger depends on the size of rows after they are written in the MC format and that size + // depends on the encoding statistics (because of variable-length encoding). The original values + // were chosen with the default-constructed encoding_stats, so let's keep it that way. + sst->write_components(mt.make_flat_reader(s, std::move(permit)), 1, s, env.manager().configure_writer("test"), encoding_stats{}).get(); + BOOST_REQUIRE_EQUAL(i, expected.size()); }, { &handler }).get(); } @@ -5317,14 +5313,12 @@ static void test_sstable_log_too_many_rows_f(int rows, uint64_t threshold, bool large_row_handler handler(std::numeric_limits::max(), threshold, std::numeric_limits::max(), std::numeric_limits::max(), f); sstables::test_env::do_with_async([&] (auto& env) { + test_db_config.host_id = locator::host_id::create_random_id(); + tmpdir dir; + auto sst = env.manager().make_sstable(sc, dir.path().string(), generation_from_value(1), version, sstables::sstable::format_types::big); + sst->write_components(mt->make_flat_reader(sc, semaphore.make_permit()), 1, sc, env.manager().configure_writer("test"), encoding_stats{}).get(); - test_db_config.host_id = locator::host_id::create_random_id(); - tmpdir dir; - auto sst = env.manager().make_sstable(sc, dir.path().string(), generation_from_value(1), version, sstables::sstable::format_types::big); - sst->write_components(mt->make_flat_reader(sc, semaphore.make_permit()), 1, sc, env.manager().configure_writer("test"), encoding_stats{}).get(); - - BOOST_REQUIRE_EQUAL(logged, expected); - + BOOST_REQUIRE_EQUAL(logged, expected); }, { &handler }).get(); } @@ -5372,14 +5366,12 @@ static void test_sstable_too_many_collection_elements_f(int elements, uint64_t t large_row_handler handler(std::numeric_limits::max(), std::numeric_limits::max(), std::numeric_limits::max(), threshold, f); sstables::test_env::do_with_async([&] (auto& env) { + test_db_config.host_id = locator::host_id::create_random_id(); + tmpdir dir; + auto sst = env.manager().make_sstable(sc, dir.path().string(), generation_from_value(1), version, sstables::sstable::format_types::big); + sst->write_components(mt->make_flat_reader(sc, semaphore.make_permit()), 1, sc, env.manager().configure_writer("test"), encoding_stats{}).get(); - test_db_config.host_id = locator::host_id::create_random_id(); - tmpdir dir; - auto sst = env.manager().make_sstable(sc, dir.path().string(), generation_from_value(1), version, sstables::sstable::format_types::big); - sst->write_components(mt->make_flat_reader(sc, semaphore.make_permit()), 1, sc, env.manager().configure_writer("test"), encoding_stats{}).get(); - - BOOST_REQUIRE_EQUAL(logged, expected); - + BOOST_REQUIRE_EQUAL(logged, expected); }, { &handler }).get(); }