From 63db741d8fc7c7e4072f8d7c0b490092b2f5c673 Mon Sep 17 00:00:00 2001 From: v01dstar Date: Wed, 4 Sep 2024 11:31:21 -0700 Subject: [PATCH] Fix test Signed-off-by: v01dstar --- CMakeLists.txt | 2 +- src/punch_hole_gc_test.cc | 2 ++ src/table_builder_test.cc | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index df840ebac..23c7930f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.27) +cmake_minimum_required(VERSION 3.0) project(titan) enable_language(CXX) enable_language(C) diff --git a/src/punch_hole_gc_test.cc b/src/punch_hole_gc_test.cc index bb6a141d3..52e476e02 100644 --- a/src/punch_hole_gc_test.cc +++ b/src/punch_hole_gc_test.cc @@ -104,6 +104,7 @@ class PunchHoleGCTest : public testing::Test { }; TEST_F(PunchHoleGCTest, PunchHole) { +#if defined(FALLOC_FL_PUNCH_HOLE) rocksdb::SyncPoint::GetInstance()->LoadDependency( {{"PunchHoleGCTest::PunchHole:AfterCompact", "TitanDBImpl::BackgroundCallGC:BeforeGCRunning"}, @@ -183,6 +184,7 @@ TEST_F(PunchHoleGCTest, PunchHole) { options_.disable_background_gc = true; options_.disable_auto_compactions = true; options_.punch_hole_threshold = 0; +#endif } } // namespace titandb diff --git a/src/table_builder_test.cc b/src/table_builder_test.cc index bb361a9b5..22e096729 100644 --- a/src/table_builder_test.cc +++ b/src/table_builder_test.cc @@ -149,6 +149,7 @@ class TableBuilderTest : public testing::Test { db_options_.dirname = tmpdir_; db_options_.statistics = nullptr; cf_options_.min_blob_size = kMinBlobSize; + env_->DeleteDir(tmpdir_); Open(); }