Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Yang Zhang <[email protected]>
  • Loading branch information
v01dstar committed Sep 19, 2024
1 parent d6bc9d9 commit 1a1088c
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions db/db_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1161,6 +1161,7 @@ class DelayFilterFactory : public CompactionFilterFactory {
};
} // anonymous namespace


static std::string CompressibleString(Random* rnd, int len) {
std::string r;
test::CompressibleString(rnd, 0.8, len, &r);
Expand Down Expand Up @@ -2680,12 +2681,17 @@ TEST_F(DBTest, GetLiveBlobFiles) {
ASSERT_EQ(cfmd.blob_file_size, bmd.blob_file_size);
}

TEST_F(DBTest, PurgeInfoLogs) {
// Disable this test, since it fails with current tikv/rocksdb CI setup.
// This test fails if it run as ./db_test, since previous test cases create
// a dir under dbname causing the assertion in line 2722 to fail. It passes
// when run as `make check -j x`, since test case is executed in separate
// directory.
// TODO: Fix this test by using `make check -j x` when TiKV CI has python3
TEST_F(DBTest, DISABLED_PurgeInfoLogs) {
Options options = CurrentOptions();
options.keep_log_file_num = 5;
options.create_if_missing = true;
options.env = env_;
env_->DeleteDir(dbname_);
for (int mode = 0; mode <= 1; mode++) {
if (mode == 1) {
options.db_log_dir = dbname_ + "_logs";
Expand Down Expand Up @@ -4339,6 +4345,7 @@ TEST_F(DBTest, ConcurrentMemtableNotSupported) {
ASSERT_NOK(db_->CreateColumnFamily(cf_options, "name", &handle));
}


TEST_F(DBTest, SanitizeNumThreads) {
for (int attempt = 0; attempt < 2; attempt++) {
const size_t kTotalTasks = 8;
Expand Down Expand Up @@ -5708,6 +5715,7 @@ TEST_F(DBTest, FileCreationRandomFailure) {
}
}


TEST_F(DBTest, DynamicMiscOptions) {
// Test max_sequential_skip_in_iterations
Options options;
Expand Down Expand Up @@ -7164,6 +7172,7 @@ TEST_F(DBTest, ReusePinnableSlice) {
1);
}


TEST_F(DBTest, DeletingOldWalAfterDrop) {
ROCKSDB_NAMESPACE::SyncPoint::GetInstance()->LoadDependency(
{{"Test:AllowFlushes", "DBImpl::BGWorkFlush"},
Expand Down Expand Up @@ -7288,6 +7297,7 @@ TEST_F(DBTest, LargeBlockSizeTest) {
ASSERT_NOK(TryReopenWithColumnFamilies({"default", "pikachu"}, options));
}


TEST_F(DBTest, CreationTimeOfOldestFile) {
const int kNumKeysPerFile = 32;
const int kNumLevelFiles = 2;
Expand Down

0 comments on commit 1a1088c

Please sign in to comment.