XComp commented on a change in pull request #13419:
URL: https://github.com/apache/flink/pull/13419#discussion_r492749511



##########
File path: flink-end-to-end-tests/test-scripts/common.sh
##########
@@ -830,3 +830,30 @@ run_test_with_timeout() {
       $TEST_COMMAND
   )
 }
+
+run_with_timeout() {
+  local timeout="$1"
+  shift
+  local pidFile="$1"
+  shift
+  local command="$@"
+
+  # invoke command
+  (eval "$command"; rm $pidFile; ) &
+  pid=$!
+  echo $pid > $pidFile
+
+  # invoke timeout guard
+  (
+    sleep $timeout
+    if [[ -e $pidFile ]]; then

Review comment:
       First, I tried to make it work with the old implementation. But I 
struggled to test it locally on MacOS. Hence, I switched to the new 
implementation. I tried to make the code change not cause changes to test 
output. Let's see if the tests run through.




----------------------------------------------------------------
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]


Reply via email to