Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
Signed-off-by: hehechen <[email protected]>
  • Loading branch information
hehechen committed May 12, 2022
1 parent c506e45 commit f1c4781
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,16 @@ class PageStorageMixedTest : public DB::base::TiFlashStorageTestBasic
storage_path_pool_v3 = std::make_unique<PathPool>(Strings{path}, Strings{path}, Strings{}, std::make_shared<PathCapacityMetrics>(0, paths, caps, Strings{}, caps), global_context.getFileProvider(), true);

global_context.setPageStorageRunMode(PageStorageRunMode::MIX_MODE);
if (!global_context.getGlobalStoragePool())
global_context.initializeGlobalStoragePoolIfNeed(*storage_path_pool_v3);
}

void SetUp() override
{
auto & global_context = DB::tests::TiFlashTestEnv::getGlobalContext();
global_context.setPageStorageRunMode(PageStorageRunMode::MIX_MODE);
TiFlashStorageTestBasic::SetUp();
const auto & path = getTemporaryPath();
createIfNotExist(path);

auto & global_context = DB::tests::TiFlashTestEnv::getGlobalContext();

std::vector<size_t> caps = {};
Strings paths = {path};
Expand All @@ -75,7 +74,7 @@ class PageStorageMixedTest : public DB::base::TiFlashStorageTestBasic

PageStorageRunMode reloadMixedStoragePool()
{
DB::tests::TiFlashTestEnv::getContext().setPageStorageRunMode(PageStorageRunMode::MIX_MODE);
db_context->setPageStorageRunMode(PageStorageRunMode::MIX_MODE);
PageStorageRunMode run_mode = storage_pool_mix->restore();
page_writer_mix = storage_pool_mix->logWriter();
page_reader_mix = storage_pool_mix->logReader();
Expand All @@ -84,7 +83,7 @@ class PageStorageMixedTest : public DB::base::TiFlashStorageTestBasic

void reloadV2StoragePool()
{
DB::tests::TiFlashTestEnv::getContext().setPageStorageRunMode(PageStorageRunMode::ONLY_V2);
db_context->setPageStorageRunMode(PageStorageRunMode::ONLY_V2);
storage_pool_v2->restore();
page_writer_v2 = storage_pool_v2->logWriter();
page_reader_v2 = storage_pool_v2->logReader();
Expand Down

0 comments on commit f1c4781

Please sign in to comment.