Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5750#discussion_r176727208
  
    --- Diff: flink-end-to-end-tests/test-scripts/common.sh ---
    @@ -59,6 +146,57 @@ function start_cluster {
       done
     }
     
    +function jm_watchdog() {
    +    expectedJms=$1
    +    ipPort=$2
    +
    +    while true; do
    +        runningJms=`jps | grep -o 'StandaloneSessionClusterEntrypoint' | 
wc -l`;
    +        missingJms=$((expectedJms-runningJms))
    +        for (( c=0; c<missingJms; c++ )); do
    +            "$FLINK_DIR"/bin/jobmanager.sh start "localhost" $2
    +        done
    +        sleep 5;
    +    done
    +}
    +
    +function kill_jm {
    +    idx=$1
    +
    +    jm_pids=`jps | grep 'StandaloneSessionClusterEntrypoint' | cut -d " " 
-f 1`
    +    jm_pids=(${jm_pids[@]})
    +
    +    pid=${jm_pids[$idx]}
    +
    +    # kill the JM and wait for the completion of its termination
    --- End diff --
    
    `kill` and `echo` are not waiting, right?


---

Reply via email to