You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tr...@apache.org on 2018/10/19 18:01:11 UTC
[flink] branch release-1.5 updated: [FLINK-10614] Let
test_batch_allround.sh rely on test-runner-common.sh for clean up
This is an automated email from the ASF dual-hosted git repository.
trohrmann pushed a commit to branch release-1.5
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.5 by this push:
new b0b1548 [FLINK-10614] Let test_batch_allround.sh rely on test-runner-common.sh for clean up
b0b1548 is described below
commit b0b1548d5476d8a1e3ccf89a180773e725b8e5f6
Author: Till Rohrmann <tr...@apache.org>
AuthorDate: Fri Oct 19 15:36:38 2018 +0200
[FLINK-10614] Let test_batch_allround.sh rely on test-runner-common.sh for clean up
With FLINK-9638, we introduced the test-runner-common.sh script which is responsible for stopping
Flink resources and reverting all changes a test might have applied. This commit updates t
est_batch_allround.sh accordingly.
---
flink-end-to-end-tests/test-scripts/common.sh | 9 +++++++++
.../test-scripts/test_batch_allround.sh | 23 +++-------------------
2 files changed, 12 insertions(+), 20 deletions(-)
diff --git a/flink-end-to-end-tests/test-scripts/common.sh b/flink-end-to-end-tests/test-scripts/common.sh
index 0f4d5ba..c4a0858 100644
--- a/flink-end-to-end-tests/test-scripts/common.sh
+++ b/flink-end-to-end-tests/test-scripts/common.sh
@@ -400,6 +400,15 @@ function tm_watchdog {
done
}
+function start_taskmanagers {
+ tmnum=$1
+ echo "Start ${tmnum} more task managers"
+ for (( c=0; c<tmnum; c++ ))
+ do
+ $FLINK_DIR/bin/taskmanager.sh start
+ done
+}
+
# Kills all job manager.
function jm_kill_all {
kill_all 'StandaloneSessionClusterEntrypoint'
diff --git a/flink-end-to-end-tests/test-scripts/test_batch_allround.sh b/flink-end-to-end-tests/test-scripts/test_batch_allround.sh
index 31c20f5..664b09c 100755
--- a/flink-end-to-end-tests/test-scripts/test_batch_allround.sh
+++ b/flink-end-to-end-tests/test-scripts/test_batch_allround.sh
@@ -23,32 +23,15 @@ TEST_PROGRAM_JAR=${END_TO_END_DIR}/flink-dataset-allround-test/target/DataSetAll
echo "Run DataSet-Allround-Test Program"
+backup_config
+
# modify configuration to include spilling to disk
-cp $FLINK_DIR/conf/flink-conf.yaml $FLINK_DIR/conf/flink-conf.yaml.bak
echo "taskmanager.network.memory.min: 10485760" >> $FLINK_DIR/conf/flink-conf.yaml
echo "taskmanager.network.memory.max: 10485760" >> $FLINK_DIR/conf/flink-conf.yaml
-backup_config
set_conf_ssl
start_cluster
-$FLINK_DIR/bin/taskmanager.sh start
-$FLINK_DIR/bin/taskmanager.sh start
-$FLINK_DIR/bin/taskmanager.sh start
-
-function test_cleanup {
- # don't call ourselves again for another signal interruption
- trap "exit -1" INT
- # don't call ourselves again for normal exit
- trap "" EXIT
-
- stop_cluster
- $FLINK_DIR/bin/taskmanager.sh stop-all
-
- # revert our modifications to the Flink distribution
- mv -f $FLINK_DIR/conf/flink-conf.yaml.bak $FLINK_DIR/conf/flink-conf.yaml
-}
-trap test_cleanup INT
-trap test_cleanup EXIT
+start_taskmanagers 3
$FLINK_DIR/bin/flink run -p 4 $TEST_PROGRAM_JAR --loadFactor 4 --outputPath $TEST_DATA_DIR/out/dataset_allround