Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: SpadeA-Tang <[email protected]>
  • Loading branch information
SpadeA-Tang committed Aug 24, 2023
1 parent 85d43bf commit 21b9ae5
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions db/compaction/compaction_job_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ class CompactionJobTestBase : public testing::Test {
mutable_cf_options_(cf_options_),
mutable_db_options_(),
table_cache_(NewLRUCache(50000, 16)),
write_buffer_manager_(db_options_.db_write_buffer_size),
versions_(new VersionSet(dbname_, &db_options_, env_options_,
table_cache_.get(), &write_controller_,
table_cache_.get(), &write_buffer_manager_,
&write_controller_,
/*block_cache_tracer=*/nullptr,
/*io_tracer=*/nullptr, /*db_session_id*/ "")),
shutting_down_(false),
Expand Down Expand Up @@ -272,11 +274,11 @@ class CompactionJobTestBase : public testing::Test {
void NewDB() {
EXPECT_OK(DestroyDB(dbname_, Options()));
EXPECT_OK(env_->CreateDirIfMissing(dbname_));
versions_.reset(new VersionSet(dbname_, &db_options_, env_options_,
table_cache_.get(), &write_controller_,
/*block_cache_tracer=*/nullptr,
/*io_tracer=*/nullptr,
/*db_session_id*/ ""));
versions_.reset(
new VersionSet(dbname_, &db_options_, env_options_, table_cache_.get(),
&write_buffer_manager_, &write_controller_,
/*block_cache_tracer=*/nullptr, /*io_tracer=*/nullptr,
/*db_session_id*/ ""));
compaction_job_stats_.Reset();
ASSERT_OK(SetIdentityFile(env_, dbname_));

Expand Down Expand Up @@ -403,6 +405,7 @@ class CompactionJobTestBase : public testing::Test {
MutableDBOptions mutable_db_options_;
std::shared_ptr<Cache> table_cache_;
WriteController write_controller_;
WriteBufferManager write_buffer_manager_;
std::unique_ptr<VersionSet> versions_;
InstrumentedMutex mutex_;
std::atomic<bool> shutting_down_;
Expand Down

0 comments on commit 21b9ae5

Please sign in to comment.