[jira] [Created] (FLINK-18217) config.sh#extractExecutionResults does not fail on empty input

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-18217) config.sh#extractExecutionResults does not fail on empty input

Shang Yuanchun (Jira)
Chesnay Schepler created FLINK-18217:
----------------------------------------

             Summary: config.sh#extractExecutionResults does not fail on empty input
                 Key: FLINK-18217
                 URL: https://issues.apache.org/jira/browse/FLINK-18217
             Project: Flink
          Issue Type: Bug
            Reporter: Chesnay Schepler


If the BashJavaUtils fail, and {{config.sh#extractExecutionResults}} is called with the exception output, which does not contain the expected lines, then it will not detect an error.

{code}
execution_results=$(echo "${output}" | grep ${EXECUTION_PREFIX})
num_lines=$(echo "${execution_results}" | wc -l)
    if [[ ${num_lines} -ne ${expected_lines} ]]; then
{code}

Apparently, even if {{execution_results}} is empty, {{$(echo "${execution_results}" | wc -l)}} returns 1.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)