From 28ef8feffa2bfc62083fb96fe97a883e418e15ce Mon Sep 17 00:00:00 2001 From: "Raphael S. Carvalho" Date: Mon, 19 Oct 2015 11:40:09 -0300 Subject: [PATCH] tests: fix test for leveled compaction test_setup::do_with_test_directory is missing. For some reason, the test wasn't failing without it until now. Adding it is the correct thing to do anyway. Signed-off-by: Raphael S. Carvalho --- tests/sstable_datafile_test.cc | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/tests/sstable_datafile_test.cc b/tests/sstable_datafile_test.cc index 166bd0445d..1331963366 100644 --- a/tests/sstable_datafile_test.cc +++ b/tests/sstable_datafile_test.cc @@ -1870,18 +1870,20 @@ SEASTAR_TEST_CASE(leveled_04) { SEASTAR_TEST_CASE(leveled_05) { // NOTE: Generations from 48 to 51 are used here. + return test_setup::do_with_test_directory([] { - // Check compaction code with leveled strategy. In this test, two sstables of level 0 will be created. - return compact_sstables({ 48, 49 }, 50, true, 1024*1024, compaction_strategy_type::leveled).then([] (auto generations) { - BOOST_REQUIRE(generations.size() == 2); - BOOST_REQUIRE(generations[0] == 50); - BOOST_REQUIRE(generations[1] == 51); + // Check compaction code with leveled strategy. In this test, two sstables of level 0 will be created. + return compact_sstables({ 48, 49 }, 50, true, 1024*1024, compaction_strategy_type::leveled).then([] (auto generations) { + BOOST_REQUIRE(generations.size() == 2); + BOOST_REQUIRE(generations[0] == 50); + BOOST_REQUIRE(generations[1] == 51); - return seastar::async([&, generations = std::move(generations)] { - for (auto gen : generations) { - auto fname = sstable::filename("tests/sstables/tests-temporary", "ks", "cf", la, gen, big, sstable::component_type::Data); - BOOST_REQUIRE(file_size(fname).get0() >= 1024*1024); - } + return seastar::async([&, generations = std::move(generations)] { + for (auto gen : generations) { + auto fname = sstable::filename("tests/sstables/tests-temporary", "ks", "cf", la, gen, big, sstable::component_type::Data); + BOOST_REQUIRE(file_size(fname).get0() >= 1024*1024); + } + }); }); }); }