diff --git a/CMakeLists.txt b/CMakeLists.txt index b879717ef..13c0f4fc5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -153,6 +153,7 @@ set(SOURCES util/comparator.cc util/crc32c.cc util/db_info_dumper.cc + util/db_test_util.cc util/dynamic_bloom.cc util/env.cc util/env_hdfs.cc diff --git a/util/db_test_util.cc b/util/db_test_util.cc index b38e97947..bfc743729 100644 --- a/util/db_test_util.cc +++ b/util/db_test_util.cc @@ -57,9 +57,12 @@ DBTestBase::DBTestBase(const std::string path) : option_config_(kDefault), } DBTestBase::~DBTestBase() { +// SyncPoint is not supported in Released Windows Mode. +#if !(defined NDEBUG) || !defined(OS_WIN) rocksdb::SyncPoint::GetInstance()->DisableProcessing(); rocksdb::SyncPoint::GetInstance()->LoadDependency({}); rocksdb::SyncPoint::GetInstance()->ClearAllCallBacks(); +#endif // !(defined NDEBUG) || !defined(OS_WIN) Close(); Options options; options.db_paths.emplace_back(dbname_, 0); diff --git a/util/db_test_util.h b/util/db_test_util.h index e2be831b8..0f3b3c6d5 100644 --- a/util/db_test_util.h +++ b/util/db_test_util.h @@ -47,7 +47,10 @@ #include "util/mutexlock.h" #include "util/scoped_arena_iterator.h" #include "util/string_util.h" +// SyncPoint is not supported in Released Windows Mode. +#if !(defined NDEBUG) || !defined(OS_WIN) #include "util/sync_point.h" +#endif // !(defined NDEBUG) || !defined(OS_WIN) #include "util/testharness.h" #include "util/testutil.h" #include "util/xfunc.h" @@ -144,11 +147,14 @@ class SpecialEnv : public EnvWrapper { } } Status Close() override { +// SyncPoint is not supported in Released Windows Mode. +#if !(defined NDEBUG) || !defined(OS_WIN) // Check preallocation size // preallocation size is never passed to base file. size_t preallocation_size = preallocation_block_size(); TEST_SYNC_POINT_CALLBACK("DBTestWritableFile.GetPreallocationStatus", &preallocation_size); +#endif // !(defined NDEBUG) || !defined(OS_WIN) return base_->Close(); } Status Flush() override { return base_->Flush(); }