This is an automated email from the ASF dual-hosted git repository.
gaoyunhaii pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 8b62a62 [FLINK-25307][test] Print the curl logs is querying
dispatcher startup failed
8b62a62 is described below
commit 8b62a6267569bb417db21b75d5e6482341fea665
Author: Yun Gao <[email protected]>
AuthorDate: Fri Jan 7 18:59:52 2022 +0800
[FLINK-25307][test] Print the curl logs is querying dispatcher startup
failed
This closes #18298.
---
flink-end-to-end-tests/test-scripts/common.sh | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/flink-end-to-end-tests/test-scripts/common.sh
b/flink-end-to-end-tests/test-scripts/common.sh
index 7d73b0a..5b7f374 100644
--- a/flink-end-to-end-tests/test-scripts/common.sh
+++ b/flink-end-to-end-tests/test-scripts/common.sh
@@ -274,15 +274,24 @@ function wait_rest_endpoint_up {
# wait at most 30 seconds until the endpoint is up
local TIMEOUT=30
for i in $(seq 1 ${TIMEOUT}); do
+ local log_file=$(mktemp)
# without the || true this would exit our script if the endpoint is not
yet up
- QUERY_RESULT=$(curl ${CURL_SSL_ARGS} "$query_url" 2> /dev/null || true)
+ QUERY_RESULT=$(curl -v ${CURL_SSL_ARGS} "$query_url" 2> ${log_file} ||
true)
# ensure the response adapts with the successful regex
if [[ ${QUERY_RESULT} =~ ${successful_response_regex} ]]; then
echo "${endpoint_name} REST endpoint is up."
return
+ else
+ echo "***************** Curl detailed output *****************"
+ echo "QUERY_RESULT is ${QUERY_RESULT}"
+ cat ${log_file}
+ echo "********************************************************"
fi
+ # Remove the temporary file
+ rm ${log_file}
+
echo "Waiting for ${endpoint_name} REST endpoint to come up..."
sleep 1
done