This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-4.2
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.2 by this push:
     new a3246eeb2b8 branch-4.2: [fix](test) Relax BE_TEST timeouts for flaky 
PythonServerTest #70978 (#71209)
a3246eeb2b8 is described below

commit a3246eeb2b890aca60c9963605b39d27336f39b0
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Dec 2 10:02:22 2026 +0800

    branch-4.2: [fix](test) Relax BE_TEST timeouts for flaky PythonServerTest 
#70978 (#71209)
    
    Cherry-picked from #70978
    
    Co-authored-by: linrrarity <[email protected]>
---
 be/src/udf/python/python_server.h         |  8 ++++----
 be/test/udf/python/python_server_test.cpp | 10 +++++-----
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/be/src/udf/python/python_server.h 
b/be/src/udf/python/python_server.h
index c72a2db43d1..d331f60ea27 100644
--- a/be/src/udf/python/python_server.h
+++ b/be/src/udf/python/python_server.h
@@ -132,10 +132,10 @@ private:
     void _check_and_recreate_processes();
 
 #ifdef BE_TEST
-    static constexpr std::chrono::milliseconds PROCESS_START_TIMEOUT {500};
-    static constexpr std::chrono::milliseconds PROCESS_TERMINATE_TIMEOUT {100};
-    static constexpr std::chrono::milliseconds PROCESS_POOL_INIT_TIMEOUT 
{1000};
-    static constexpr std::chrono::milliseconds PROCESS_REPAIR_WAIT_TIMEOUT 
{200};
+    static constexpr std::chrono::milliseconds PROCESS_START_TIMEOUT {2000};
+    static constexpr std::chrono::milliseconds PROCESS_TERMINATE_TIMEOUT {300};
+    static constexpr std::chrono::milliseconds PROCESS_POOL_INIT_TIMEOUT 
{4000};
+    static constexpr std::chrono::milliseconds PROCESS_REPAIR_WAIT_TIMEOUT 
{500};
 #else
     static constexpr std::chrono::milliseconds PROCESS_START_TIMEOUT {5000};
     static constexpr std::chrono::milliseconds PROCESS_TERMINATE_TIMEOUT 
{1000};
diff --git a/be/test/udf/python/python_server_test.cpp 
b/be/test/udf/python/python_server_test.cpp
index 39e6143bc14..83fc19d9dad 100644
--- a/be/test/udf/python/python_server_test.cpp
+++ b/be/test/udf/python/python_server_test.cpp
@@ -151,7 +151,7 @@ protected:
         ofs << "SOCKET_PREFIX=\"$3\"\n";
         ofs << "SOCKET_BASE=\"${SOCKET_PREFIX#grpc+unix://}\"\n";
         ofs << "SOCKET_FILE=\"${SOCKET_BASE}_$$.sock\"\n";
-        ofs << "touch \"$SOCKET_FILE\"\n";
+        ofs << ": > \"$SOCKET_FILE\"\n";
         ofs << "trap 'rm -f \"$SOCKET_FILE\"; exit 0' TERM INT\n";
         ofs << "while true; do sleep 1; done\n";
         ofs.close();
@@ -302,7 +302,7 @@ TEST_F(PythonServerTest, 
ForkWithoutSocketCreationReturnsAfterBoundedTerminate)
     EXPECT_FALSE(status.ok());
     EXPECT_EQ(process, nullptr);
     EXPECT_NE(status.to_string().find("socket file not found"), 
std::string::npos);
-    EXPECT_LT(elapsed.count(), 2000);
+    EXPECT_LT(elapsed.count(), 8000);
 }
 
 TEST_F(PythonServerTest, 
ForkEnqueuesBackgroundReapWhenKilledStartFailureIsNotReaped) {
@@ -414,12 +414,12 @@ TEST_F(PythonServerTest, 
EnsurePoolInitializedRetriesAfterRuntimeIsRepaired) {
     // execute the repaired file and publish its process into the next 
generation's pool.
     {
         std::unique_lock lock(generation_completion->mutex);
-        ASSERT_TRUE(generation_completion->cv.wait_for(lock, 
std::chrono::seconds(5), [&]() {
+        ASSERT_TRUE(generation_completion->cv.wait_for(lock, 
std::chrono::seconds(10), [&]() {
             return generation_completion->worker_finished;
         }));
     }
     ASSERT_TRUE(mgr.wait_for_process_pool_initialization_finished_for_test(
-            version, std::chrono::seconds(5)));
+            version, std::chrono::seconds(10)));
 
     // Repair the runtime in place and retry the same version key. Production 
can hit this when an
     // environment or server entry is fixed after a transient initialization 
failure.
@@ -653,7 +653,7 @@ TEST_F(PythonServerTest, 
EnsurePoolInitializedSucceedsWithOneStuckWorkerAndOneUs
     // Wait on the same condition variable used by the production coordinator 
instead of polling
     // or asserting on a racy intermediate state.
     EXPECT_TRUE(mgr.wait_for_process_pool_initialized_for_test(version,
-                                                               
std::chrono::milliseconds(2000)));
+                                                               
std::chrono::milliseconds(8000)));
     EXPECT_TRUE(mgr.process_pool_is_initialized_for_test(version));
 
     mgr.shutdown();


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to