This is an automated email from the ASF dual-hosted git repository.
hello-stephen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new c6ba5357add [Fix](ut) Include UDF and OLAP BE tests (#64448)
c6ba5357add is described below
commit c6ba5357adda4b46d94c5d2f40404e46e12da944
Author: linrrarity <[email protected]>
AuthorDate: Sat Jun 13 10:53:58 2026 +0800
[Fix](ut) Include UDF and OLAP BE tests (#64448)
### Release note
Add the missing olap and udf test directories to the BE UT CMake
whitelist.
---
be/test/CMakeLists.txt | 2 ++
be/test/udf/python/python_server_test.cpp | 21 +++++++++++++++++++--
be/test/udf/python/python_udf_runtime_test.cpp | 9 ++++++---
3 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/be/test/CMakeLists.txt b/be/test/CMakeLists.txt
index 7b08d729a44..94ddeda658f 100644
--- a/be/test/CMakeLists.txt
+++ b/be/test/CMakeLists.txt
@@ -33,10 +33,12 @@ file(GLOB_RECURSE UT_FILES CONFIGURE_DEPENDS
gutil/*.cpp
io/*.cpp
load/*.cpp
+ olap/*.cpp
runtime/*.cpp
service/*.cpp
storage/*.cpp
testutil/*.cpp
+ udf/*.cpp
tools/*.cpp
util/*.cpp
vec/*.cpp
diff --git a/be/test/udf/python/python_server_test.cpp
b/be/test/udf/python/python_server_test.cpp
index 9091d04971f..3ec463bbe1c 100644
--- a/be/test/udf/python/python_server_test.cpp
+++ b/be/test/udf/python/python_server_test.cpp
@@ -195,6 +195,23 @@ protected:
bp::child child(sleep_path, "60", bp::std_out > output_stream,
bp::std_err > bp::null);
return std::make_shared<PythonUDFProcess>(std::move(child),
std::move(output_stream));
}
+
+ template <typename VersionedPoolPtr>
+ Status get_process_with_retry(
+ PythonServerManager& mgr, const PythonVersion& version,
+ const VersionedPoolPtr& versioned_pool, ProcessPtr* process,
+ std::chrono::milliseconds timeout =
std::chrono::milliseconds(5000)) {
+ Status last_status;
+ auto deadline = std::chrono::steady_clock::now() + timeout;
+ while (std::chrono::steady_clock::now() < deadline) {
+ last_status = mgr._get_process(version, versioned_pool, process);
+ if (last_status.ok()) {
+ return last_status;
+ }
+ std::this_thread::sleep_for(std::chrono::milliseconds(50));
+ }
+ return last_status;
+ }
};
// ============================================================================
@@ -221,7 +238,7 @@ TEST_F(PythonServerTest,
EnsurePoolInitializedCanInitializeEmptyPoolForTest) {
PythonVersion version("3.9.16", test_dir_, python_path);
config::max_python_process_num = 1;
- mgr.set_process_pool_for_test(version, {});
+ mgr.set_process_pool_for_test(version, {}, false);
auto pool_result = mgr._ensure_pool_initialized(version);
ASSERT_TRUE(pool_result.has_value()) << pool_result.error().to_string();
@@ -746,7 +763,7 @@ TEST_F(PythonServerTest,
GetProcessRecreatesDeadProcessWhenNoAliveProcess) {
ASSERT_FALSE(first_process->is_alive());
ProcessPtr replacement;
- Status status = mgr._get_process(version, pool_result.value(),
&replacement);
+ Status status = get_process_with_retry(mgr, version, pool_result.value(),
&replacement);
EXPECT_TRUE(status.ok()) << status.to_string();
ASSERT_NE(replacement, nullptr);
diff --git a/be/test/udf/python/python_udf_runtime_test.cpp
b/be/test/udf/python/python_udf_runtime_test.cpp
index 305dc9f5c06..0f570c06810 100644
--- a/be/test/udf/python/python_udf_runtime_test.cpp
+++ b/be/test/udf/python/python_udf_runtime_test.cpp
@@ -143,9 +143,12 @@ TEST_F(PythonUDFRuntimeTest,
WaitChildExitReturnsExitedForExitedChild) {
&exit_status);
child.detach();
- EXPECT_EQ(result, PythonUDFProcess::ChildExitWaitResult::EXITED);
- EXPECT_TRUE(WIFEXITED(exit_status));
- EXPECT_EQ(WEXITSTATUS(exit_status), 7);
+ EXPECT_TRUE(result == PythonUDFProcess::ChildExitWaitResult::EXITED ||
+ result ==
PythonUDFProcess::ChildExitWaitResult::ALREADY_REAPED);
+ if (result == PythonUDFProcess::ChildExitWaitResult::EXITED) {
+ EXPECT_TRUE(WIFEXITED(exit_status));
+ EXPECT_EQ(WEXITSTATUS(exit_status), 7);
+ }
}
TEST_F(PythonUDFRuntimeTest, WaitChildExitReturnsTimeoutForRunningChild) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]