From fd15fc98754a469dee8c7fb077d098abdef7d998 Mon Sep 17 00:00:00 2001 From: yiguolei Date: Sat, 28 Dec 2024 00:37:52 +0800 Subject: [PATCH] f --- be/test/olap/wal/wal_manager_test.cpp | 2 +- be/test/vec/exec/vfile_scanner_exception_test.cpp | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/be/test/olap/wal/wal_manager_test.cpp b/be/test/olap/wal/wal_manager_test.cpp index af006dd9092e172..f26c7b4ed0882f9 100644 --- a/be/test/olap/wal/wal_manager_test.cpp +++ b/be/test/olap/wal/wal_manager_test.cpp @@ -55,7 +55,7 @@ class WalManagerTest : public testing::Test { void SetUp() override { prepare(); _env = ExecEnv::GetInstance(); - _env->_cluster_info = new ClusterInfo(); + _env->_cluster_info = std::move(std::make_unique()); _env->_cluster_info->master_fe_addr.hostname = "host name"; _env->_cluster_info->master_fe_addr.port = 1234; _env->_cluster_info->backend_id = 1001; diff --git a/be/test/vec/exec/vfile_scanner_exception_test.cpp b/be/test/vec/exec/vfile_scanner_exception_test.cpp index 4b6ce46bd88cf3f..388c1c4f9e83b99 100644 --- a/be/test/vec/exec/vfile_scanner_exception_test.cpp +++ b/be/test/vec/exec/vfile_scanner_exception_test.cpp @@ -108,7 +108,6 @@ class VfileScannerExceptionTest : public testing::Test { TFileRangeDesc _range_desc; TFileScanRange _scan_range; std::unique_ptr _kv_cache = nullptr; - std::unique_ptr _cluster_info = nullptr; }; void VfileScannerExceptionTest::_init_desc_table() { @@ -267,9 +266,8 @@ void VfileScannerExceptionTest::init() { _scan_range.params.format_type = TFileFormatType::FORMAT_JNI; _kv_cache.reset(new ShardedKVCache(48)); - _cluster_info.reset(new ClusterInfo()); _env = ExecEnv::GetInstance(); - _env->_cluster_info = _cluster_info.get(); + _env->_cluster_info = std::move(std::make_unique()); _env->_cluster_info->master_fe_addr.hostname = "host name"; _env->_cluster_info->master_fe_addr.port = _backend_id; _env->_cluster_info->backend_id = 1001;