lidavidm commented on code in PR #13520:
URL: https://github.com/apache/arrow/pull/13520#discussion_r918339017
##########
cpp/src/arrow/filesystem/gcsfs_test.cc:
##########
@@ -106,8 +110,27 @@ class GcsTestbench : public ::testing::Environment {
continue;
}
- server_process_ = bp::child(exe_path, "-m", "testbench", "--port",
port_, group_);
- if (server_process_.valid() && server_process_.running()) break;
+ bp::ipstream output;
+ server_process_ = bp::child(exe_path, "-m", "testbench", "--port",
port_, group_,
+ bp::std_err > output);
+ // Wait for message: "* Restarting with"
+ auto testbench_is_running = [&output, this](bp::child& process) {
+ std::string line;
+ std::chrono::time_point<std::chrono::system_clock> end =
+ std::chrono::system_clock::now() + std::chrono::seconds(10);
Review Comment:
nit: std::chrono::steady_clock instead?
##########
cpp/src/arrow/filesystem/gcsfs_test.cc:
##########
@@ -106,8 +110,27 @@ class GcsTestbench : public ::testing::Environment {
continue;
}
- server_process_ = bp::child(exe_path, "-m", "testbench", "--port",
port_, group_);
- if (server_process_.valid() && server_process_.running()) break;
+ bp::ipstream output;
Review Comment:
This still makes me suspicious since server_process_ outlives output. Maybe
to make this a member variable, it has to be re-initialized on each loop
iteration?
--
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]