bazel client: Include the Bazel server pid in the `still trying to connect to local Bazel server` message.
PiperOrigin-RevId: 409163444
diff --git a/src/main/cpp/blaze.cc b/src/main/cpp/blaze.cc
index a7cbde7..e59a10e 100644
--- a/src/main/cpp/blaze.cc
+++ b/src/main/cpp/blaze.cc
@@ -797,8 +797,9 @@
auto elapsed_time = std::chrono::duration_cast<std::chrono::seconds>(
attempt_time - start_time);
BAZEL_LOG(USER) << "... still trying to connect to local "
- << startup_options.product_name << " server after "
- << elapsed_time.count() << " seconds ...";
+ << startup_options.product_name << " server ("
+ << server_pid << ") after " << elapsed_time.count()
+ << " seconds ...";
last_message_time = attempt_time;
}
diff --git a/src/test/shell/integration/bazel_command_log_test.sh b/src/test/shell/integration/bazel_command_log_test.sh
index 6a67b9e..5b97c0e 100755
--- a/src/test/shell/integration/bazel_command_log_test.sh
+++ b/src/test/shell/integration/bazel_command_log_test.sh
@@ -39,7 +39,7 @@
-e '/^\$TEST_TMPDIR defined: output root default is/d' \
-e '/^OpenJDK 64-Bit Server VM warning: ignoring option UseSeparateVSpacesInYoungGen; support was removed in 8.0/d' \
-e '/^Starting local B[azel]* server and connecting to it\.\.\.\.*$/d' \
- -e '/^\.\.\. still trying to connect to local B[azel]* server after [1-9][0-9]* seconds \.\.\.\.*$/d' \
+ -e '/^\.\.\. still trying to connect to local B[azel]* server ([0-9]+) after [1-9][0-9]* seconds \.\.\.\.*$/d' \
-e '/^Killed non-responsive server process/d' \
-e '/server needs to be killed, because the startup options are different/d' \
-e '/^WARNING: Waiting for server process to terminate (waited 5 seconds, waiting at most 60)$/d' \