Disable fsync in DB tests with timeouts (#7380)
Summary: Some tests were encountering 600 second timeout in CI, such as `./db_universal_compaction_test --gtest_filter=NumLevels/DBTestUniversalCompaction.UniversalCompactionTrivialMoveTest2/5`, `./db_properties_test --gtest_filter=DBPropertiesTest.AggregatedTablePropertiesAtLevel`, and `./db_basic_test --gtest_filter=DBBasicTest.MultiGetBatchedSortedMultiFile`. Pull Request resolved: https://github.com/facebook/rocksdb/pull/7380 Test Plan: - `./db_universal_compaction_test --gtest_filter=NumLevels/DBTestUniversalCompaction.UniversalCompactionTrivialMoveTest2/5`: 40 -> 3 seconds - `./db_properties_test --gtest_filter=DBPropertiesTest.AggregatedTablePropertiesAtLevel`: 106 -> 1 second - `./db_basic_test --gtest_filter=DBBasicTest.MultiGetBatchedSortedMultiFile`: 27 -> 1 second Reviewed By: anand1976 Differential Revision: D23674570 Pulled By: ajkr fbshipit-source-id: 4d4ca6a4e2d2e76fcf8b6f6cce91e0f98ba5050c
This commit is contained in:
parent
bf1aeebb6c
commit
9d3b2db9b5
@ -28,7 +28,7 @@ namespace ROCKSDB_NAMESPACE {
|
|||||||
|
|
||||||
class DBBasicTest : public DBTestBase {
|
class DBBasicTest : public DBTestBase {
|
||||||
public:
|
public:
|
||||||
DBBasicTest() : DBTestBase("/db_basic_test", /*env_do_fsync=*/true) {}
|
DBBasicTest() : DBTestBase("/db_basic_test", /*env_do_fsync=*/false) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
TEST_F(DBBasicTest, OpenWhenOpen) {
|
TEST_F(DBBasicTest, OpenWhenOpen) {
|
||||||
@ -2391,7 +2391,7 @@ class DBBasicTestMultiGet : public DBTestBase {
|
|||||||
DBBasicTestMultiGet(std::string test_dir, int num_cfs, bool compressed_cache,
|
DBBasicTestMultiGet(std::string test_dir, int num_cfs, bool compressed_cache,
|
||||||
bool uncompressed_cache, bool _compression_enabled,
|
bool uncompressed_cache, bool _compression_enabled,
|
||||||
bool _fill_cache, uint32_t compression_parallel_threads)
|
bool _fill_cache, uint32_t compression_parallel_threads)
|
||||||
: DBTestBase(test_dir, /*env_do_fsync=*/true) {
|
: DBTestBase(test_dir, /*env_do_fsync=*/false) {
|
||||||
compression_enabled_ = _compression_enabled;
|
compression_enabled_ = _compression_enabled;
|
||||||
fill_cache_ = _fill_cache;
|
fill_cache_ = _fill_cache;
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ namespace ROCKSDB_NAMESPACE {
|
|||||||
class DBPropertiesTest : public DBTestBase {
|
class DBPropertiesTest : public DBTestBase {
|
||||||
public:
|
public:
|
||||||
DBPropertiesTest()
|
DBPropertiesTest()
|
||||||
: DBTestBase("/db_properties_test", /*env_do_fsync=*/true) {}
|
: DBTestBase("/db_properties_test", /*env_do_fsync=*/false) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifndef ROCKSDB_LITE
|
#ifndef ROCKSDB_LITE
|
||||||
|
@ -27,7 +27,7 @@ class DBTestUniversalCompactionBase
|
|||||||
public ::testing::WithParamInterface<std::tuple<int, bool>> {
|
public ::testing::WithParamInterface<std::tuple<int, bool>> {
|
||||||
public:
|
public:
|
||||||
explicit DBTestUniversalCompactionBase(const std::string& path)
|
explicit DBTestUniversalCompactionBase(const std::string& path)
|
||||||
: DBTestBase(path, /*env_do_fsync=*/true) {}
|
: DBTestBase(path, /*env_do_fsync=*/false) {}
|
||||||
void SetUp() override {
|
void SetUp() override {
|
||||||
num_levels_ = std::get<0>(GetParam());
|
num_levels_ = std::get<0>(GetParam());
|
||||||
exclusive_manual_compaction_ = std::get<1>(GetParam());
|
exclusive_manual_compaction_ = std::get<1>(GetParam());
|
||||||
@ -45,7 +45,7 @@ class DBTestUniversalCompaction : public DBTestUniversalCompactionBase {
|
|||||||
class DBTestUniversalCompaction2 : public DBTestBase {
|
class DBTestUniversalCompaction2 : public DBTestBase {
|
||||||
public:
|
public:
|
||||||
DBTestUniversalCompaction2()
|
DBTestUniversalCompaction2()
|
||||||
: DBTestBase("/db_universal_compaction_test2", /*env_do_fsync=*/true) {}
|
: DBTestBase("/db_universal_compaction_test2", /*env_do_fsync=*/false) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
Loading…
Reference in New Issue
Block a user