github-actions[bot] commented on code in PR #64448:
URL: https://github.com/apache/doris/pull/64448#discussion_r3401360233


##########
be/test/udf/python/python_server_test.cpp:
##########
@@ -195,6 +195,23 @@ class PythonServerTest : public ::testing::Test {
         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));

Review Comment:
   Now that `udf/*.cpp` is part of `doris_be_test`, this source has to be 
self-contained. This helper uses `std::this_thread::sleep_for`, and the file 
already has another `sleep_for` below, but it never includes `<thread>`. 
`<future>` is not required to expose `std::this_thread::sleep_for`; local `g++` 
and `clang++` syntax checks both fail with this include set. Please add 
`#include <thread>` before enabling this file in the target.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to