github-actions[bot] commented on code in PR #41046:
URL: https://github.com/apache/beam/pull/41046#discussion_r4496025773
##########
runners/portability/test_flink_uber_jar.sh:
##########
@@ -109,6 +109,23 @@ java \
-jar "$FLINK_MINI_CLUSTER_JAR" \
--rest-port "$FLINK_PORT" \
--rest-bind-address localhost &
+FLINK_PID=$!
+
+for i in $(seq 1 60); do
+ if ! kill -0 "$FLINK_PID" 2>/dev/null; then
+ echo "Flink mini cluster exited prematurely"
+ exit 1
Review Comment:
**🟢 Low**: If the Flink mini cluster exits prematurely (or times out on line
125), exiting immediately here skips the `rm -rf "$ENV_DIR"` cleanup at the
bottom of the script. Consider removing `$ENV_DIR` before exiting (or
registering a `trap` on `EXIT` to clean up both `$FLINK_PID` and `$ENV_DIR`).
```suggestion
rm -rf "$ENV_DIR" && exit 1
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]