diff --git a/be/test/olap/primary_key_index_test.cpp b/be/test/olap/primary_key_index_test.cpp index 442a004603..a739dfcaf7 100644 --- a/be/test/olap/primary_key_index_test.cpp +++ b/be/test/olap/primary_key_index_test.cpp @@ -134,18 +134,18 @@ TEST_F(PrimaryKeyIndexTest, builder) { MemPool pool; while (remaining > 0) { std::unique_ptr iter; - DCHECK(index_reader.new_iterator(&iter).ok()); + EXPECT_TRUE(index_reader.new_iterator(&iter).ok()); size_t num_to_read = std::min(batch_size, remaining); auto index_type = vectorized::DataTypeFactory::instance().create_data_type( index_reader.type_info()->type(), 1, 0); auto index_column = index_type->create_column(); Slice last_key_slice(last_key); - DCHECK(iter->seek_at_or_after(&last_key_slice, &exact_match).ok()); + EXPECT_TRUE(iter->seek_at_or_after(&last_key_slice, &exact_match).ok()); size_t num_read = num_to_read; - DCHECK(iter->next_batch(&num_read, index_column).ok()); - DCHECK(num_to_read == num_read); + EXPECT_TRUE(iter->next_batch(&num_read, index_column).ok()); + EXPECT_EQ(num_to_read, num_read); last_key = index_column->get_data_at(num_read - 1).to_string(); // exclude last_key, last_key will be read in next batch. if (num_read == batch_size && num_read != remaining) { diff --git a/be/test/runtime/test_env.cc b/be/test/runtime/test_env.cc index 4551dfb330..0f3a440e7b 100644 --- a/be/test/runtime/test_env.cc +++ b/be/test/runtime/test_env.cc @@ -17,15 +17,14 @@ #include "runtime/test_env.h" +#include #include #include #include "olap/storage_engine.h" -#include "runtime/fragment_mgr.h" #include "runtime/result_queue_mgr.h" #include "util/disk_info.h" -#include "util/priority_thread_pool.hpp" namespace doris { @@ -43,7 +42,7 @@ void TestEnv::init_tmp_file_mgr(const std::vector& tmp_dirs, bool o DiskInfo::init(); // will use DiskInfo::num_disks(), DiskInfo should be initialized before auto st = _tmp_file_mgr->init_custom(tmp_dirs, one_dir_per_device); - DCHECK(st.ok()) << st; + EXPECT_TRUE(st.ok()); } TestEnv::~TestEnv() { @@ -97,7 +96,7 @@ void TestEnv::init_storage_engine(bool need_open, const std::vector } else { _engine = new StorageEngine(options); } - DCHECK(st.ok()) << st; + EXPECT_TRUE(st.ok()); _exec_env->set_storage_engine(_engine); } diff --git a/be/test/testutil/desc_tbl_builder.cc b/be/test/testutil/desc_tbl_builder.cc index 86602cac6b..a03a87b0d6 100644 --- a/be/test/testutil/desc_tbl_builder.cc +++ b/be/test/testutil/desc_tbl_builder.cc @@ -17,6 +17,8 @@ #include "testutil/desc_tbl_builder.h" +#include + #include #include "runtime/descriptors.h" @@ -75,7 +77,7 @@ DescriptorTbl* DescriptorTblBuilder::build() { } Status status = DescriptorTbl::create(_obj_pool, thrift_desc_tbl, &desc_tbl); - DCHECK(status.ok()); + EXPECT_TRUE(status.ok()); return desc_tbl; } diff --git a/be/test/util/threadpool_test.cpp b/be/test/util/threadpool_test.cpp index 955f3a45ee..d268db2b92 100644 --- a/be/test/util/threadpool_test.cpp +++ b/be/test/util/threadpool_test.cpp @@ -327,7 +327,9 @@ TEST_F(ThreadPoolTest, TestZeroQueueSize) { #ifndef THREAD_SANITIZER TEST_F(ThreadPoolTest, TestDeadlocks) { ::testing::FLAGS_gtest_death_test_style = "threadsafe"; -#ifdef __APPLE__ +#ifdef NDEBUG + const char* death_msg = "doris::ThreadPool::check_not_pool_thread_unlocked()"; +#elif defined(__APPLE__) const char* death_msg = "_ZNSt3__1L8__invokeIRNS_6__bindIMN5doris10ThreadPoolEFvvEJPS3_EEEJEEEDTclscT_fp_" "spscT0_fp0_EEOS9_DpOSA_|_ZNSt3__18__invokeB6v15007IRNS_6__" diff --git a/be/test/vec/utils/arrow_column_to_doris_column_test.cpp b/be/test/vec/utils/arrow_column_to_doris_column_test.cpp index f16558ae86..807d8d1c11 100644 --- a/be/test/vec/utils/arrow_column_to_doris_column_test.cpp +++ b/be/test/vec/utils/arrow_column_to_doris_column_test.cpp @@ -618,7 +618,7 @@ std::shared_ptr create_array_array(std::vector offsets_buf = std::move(offsets_buf_tmp.ValueOrDie()); diff --git a/run-be-ut.sh b/run-be-ut.sh index 18e9d078b7..efdd0afc79 100755 --- a/run-be-ut.sh +++ b/run-be-ut.sh @@ -123,7 +123,7 @@ if [[ -z "${PARALLEL}" ]]; then PARALLEL="$(($(nproc) / 5 + 1))" fi -CMAKE_BUILD_TYPE="${BUILD_TYPE:-ASAN}" +CMAKE_BUILD_TYPE="${BUILD_TYPE_UT:-ASAN}" CMAKE_BUILD_TYPE="$(echo "${CMAKE_BUILD_TYPE}" | awk '{ print(toupper($0)) }')" echo "Get params: