wjones127 commented on code in PR #13520:
URL: https://github.com/apache/arrow/pull/13520#discussion_r917009515
##########
cpp/src/arrow/filesystem/gcsfs_test.cc:
##########
@@ -105,9 +106,21 @@ class GcsTestbench : public ::testing::Environment {
error += " (exe not found)";
continue;
}
-
- server_process_ = bp::child(exe_path, "-m", "testbench", "--port",
port_, group_);
- if (server_process_.valid() && server_process_.running()) break;
+ // TODO: should I be worried about lifetime of this variable?
+ 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](bp::child& process) {
+ std::string line;
+ while (process.valid() && process.running() && std::getline(output,
line)) {
+ if (line.find("* Restarting with") != std::string::npos) return true;
+ }
+ return false;
+ };
+
+ if (testbench_is_running(server_process_)) break;
Review Comment:
I tried writing a synchronous version that used `peek()` before calling
`getline()`.
##########
cpp/src/arrow/filesystem/gcsfs_test.cc:
##########
@@ -278,7 +291,8 @@ class GcsIntegrationTest : public ::testing::Test {
class TestGCSFSGeneric : public GcsIntegrationTest, public
GenericFileSystemTest {
public:
void SetUp() override {
- GcsIntegrationTest::SetUp();
+ GcsIntegrationTest::SetUp(); // Setup failure is not propagating
Review Comment:
That's it! Thanks!
--
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]