Skip to content

Commit

Permalink
[FLINK-18217][conf] Explicitly check for empty string
Browse files Browse the repository at this point in the history
* [FLINK-18217][conf] Explicitly check for empty string

* +

* ++
  • Loading branch information
zentol committed Jun 11, 2020
1 parent 0b0a6bc commit 6216906
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions flink-dist/src/main/flink-bin/bin/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,11 @@ extractExecutionResults() {

execution_results=$(echo "${output}" | grep ${EXECUTION_PREFIX})
num_lines=$(echo "${execution_results}" | wc -l)
# explicit check for empty result, becuase if execution_results is empty, then wc returns 1
if [[ -z ${execution_results} ]]; then
echo "[ERROR] The execution result is empty." 1>&2
exit 1
fi
if [[ ${num_lines} -ne ${expected_lines} ]]; then
echo "[ERROR] The execution results has unexpected number of lines, expected: ${expected_lines}, actual: ${num_lines}." 1>&2
echo "[ERROR] An execution result line is expected following the prefix '${EXECUTION_PREFIX}'" 1>&2
Expand Down

0 comments on commit 6216906

Please sign in to comment.