[ 
https://issues.apache.org/jira/browse/FLINK-10711?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16675192#comment-16675192
 ] 

ASF GitHub Bot commented on FLINK-10711:
----------------------------------------

zentol commented on a change in pull request #7023: [FLINK-10711] [e2e] Allow 
basic error handling with bash
URL: https://github.com/apache/flink/pull/7023#discussion_r230758215
 
 

 ##########
 File path: flink-end-to-end-tests/test-scripts/common.sh
 ##########
 @@ -373,7 +384,9 @@ function stop_cluster {
   "$FLINK_DIR"/bin/stop-cluster.sh
 
   # stop zookeeper only if there are processes running
-  if ! [ "`jps | grep 'FlinkZooKeeperQuorumPeer' | wc -l`" = "0" ]; then
+  zookeeper_process_count=$(jps | grep -c 'FlinkZooKeeperQuorumPeer' || true)
 
 Review comment:
   according to [this 
document](https://www.gnu.org/software/bash/manual/bashref.html#The-Set-Builtin)
 conditions may return non-zero exit codes without causing the script to exit.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> flink-end-to-end-tests can fail silently
> ----------------------------------------
>
>                 Key: FLINK-10711
>                 URL: https://issues.apache.org/jira/browse/FLINK-10711
>             Project: Flink
>          Issue Type: Bug
>          Components: E2E Tests
>    Affects Versions: 1.7.0
>            Reporter: Piotr Nowojski
>            Assignee: Timo Walther
>            Priority: Blocker
>              Labels: pull-request-available
>             Fix For: 1.7.0
>
>
> Because they are written in bash and they are not setting
> {code:bash}
> set -e
> {code}
> at the beginning, errors can be swallowed silently.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to