ifndef-SleePy commented on a change in pull request #11831:
URL: https://github.com/apache/flink/pull/11831#discussion_r415576635
##########
File path:
flink-end-to-end-tests/test-scripts/test_ha_per_job_cluster_datastream.sh
##########
@@ -148,4 +149,23 @@ STATE_BACKEND_TYPE=${1:-file}
STATE_BACKEND_FILE_ASYNC=${2:-true}
STATE_BACKEND_ROCKS_INCREMENTAL=${3:-false}
-run_ha_test 4 ${STATE_BACKEND_TYPE} ${STATE_BACKEND_FILE_ASYNC}
${STATE_BACKEND_ROCKS_INCREMENTAL}
+function kill_test_watchdog() {
+ local watchdog_pid=`cat $TEST_DATA_DIR/job_watchdog.pid`
+ echo "Stopping job timeout watchdog (with pid=$watchdog_pid)"
+ kill $watchdog_pid
+}
+on_exit kill_test_watchdog
+
+(
+ cmdpid=$BASHPID;
+ (sleep $TEST_TIMEOUT_SECONDS; # set a timeout of 10 minutes for this test
+ echo "Test (pid: $cmdpid) did not finish after $TEST_TIMEOUT_SECONDS
seconds."
+ echo "Printing Flink logs and killing it:"
+ cat ${FLINK_DIR}/log/*
+ kill "$cmdpid") & watchdog_pid=$!
Review comment:
That's OK for me :)
##########
File path: flink-end-to-end-tests/test-scripts/test_ha_datastream.sh
##########
@@ -100,4 +102,21 @@ STATE_BACKEND_FILE_ASYNC=${2:-true}
STATE_BACKEND_ROCKS_INCREMENTAL=${3:-false}
ZOOKEEPER_VERSION=${4:-3.4}
-run_ha_test 4 ${STATE_BACKEND_TYPE} ${STATE_BACKEND_FILE_ASYNC}
${STATE_BACKEND_ROCKS_INCREMENTAL} ${ZOOKEEPER_VERSION}
+function kill_test_watchdog() {
+ local watchdog_pid=`cat $TEST_DATA_DIR/job_watchdog.pid`
+ echo "Stopping job timeout watchdog (with pid=$watchdog_pid)"
+ kill $watchdog_pid
+}
+on_exit kill_test_watchdog
+
+(
+ cmdpid=$BASHPID;
Review comment:
Ah, you are right. It's in another sub-process.
I come up with a work-around way. It probably works that executing the
watchdog in original main process and executing the testing scripts in
sub-process. We can get the sub-process pid in main process.
But I guess it's not a big deal, as MacOS is not a main scenario. I hope
this PR could be merged asap. I would help a lot.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]