You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by kk...@apache.org on 2019/08/01 09:31:38 UTC
[flink] 04/04: [hotfix][e2e] Harden
test_stateful_stream_job_upgrade e2e test.
This is an automated email from the ASF dual-hosted git repository.
kkloudas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
commit a33ac4ca9f4031bbaaad8e48f7abb01e281940cc
Author: Kostas Kloudas <kk...@gmail.com>
AuthorDate: Wed Jul 31 15:35:08 2019 +0200
[hotfix][e2e] Harden test_stateful_stream_job_upgrade e2e test.
---
.../test-scripts/test_stateful_stream_job_upgrade.sh | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/flink-end-to-end-tests/test-scripts/test_stateful_stream_job_upgrade.sh b/flink-end-to-end-tests/test-scripts/test_stateful_stream_job_upgrade.sh
index e92b55c..1c48528 100755
--- a/flink-end-to-end-tests/test-scripts/test_stateful_stream_job_upgrade.sh
+++ b/flink-end-to-end-tests/test-scripts/test_stateful_stream_job_upgrade.sh
@@ -63,6 +63,17 @@ SAVEPOINT_PATH=$(stop_with_savepoint ${ORIGINAL_JOB} ${TEST_DATA_DIR} \
wait_job_terminal_state "${ORIGINAL_JOB}" "FINISHED"
+# isolate the path without the scheme ("file:") and do the necessary checks
+SAVEPOINT_DIR=${SAVEPOINT_PATH#"file:"}
+
+if [ -z "$SAVEPOINT_DIR" ]; then
+ echo "Savepoint location was empty. This may mean that the stop-with-savepoint failed."
+ exit 1
+elif [ ! -d "$SAVEPOINT_DIR" ]; then
+ echo "Savepoint $SAVEPOINT_PATH does not exist."
+ exit 1
+fi
+
JOB=$(job ${NEW_DOP})
UPGRADED_JOB=$(${JOB} --test.job.variant upgraded \
| grep "Job has been submitted with JobID" | sed 's/.* //g')