You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2019/05/09 12:31:55 UTC

[flink] 11/15: deduplicate empty .out file check

This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch travis_jdk9_test
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 78a613b5c38899b0fe0cbf76acaf7cd405fd3847
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Wed May 8 11:59:27 2019 +0200

    deduplicate empty .out file check
---
 flink-end-to-end-tests/test-scripts/common_ha.sh                  | 8 ++++----
 .../test-scripts/test_ha_per_job_cluster_datastream.sh            | 6 ++----
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/flink-end-to-end-tests/test-scripts/common_ha.sh b/flink-end-to-end-tests/test-scripts/common_ha.sh
index 6521cb4..154ddb9 100644
--- a/flink-end-to-end-tests/test-scripts/common_ha.sh
+++ b/flink-end-to-end-tests/test-scripts/common_ha.sh
@@ -18,6 +18,8 @@
 # limitations under the License.
 ################################################################################
 
+source "${END_TO_END_DIR}"/test-scripts/common.sh
+
 # flag indicating if we have already cleared up things after a test
 CLEARED=0
 
@@ -59,10 +61,8 @@ function verify_logs() {
     local VERIFY_CHECKPOINTS=$2
 
     # verify that we have no alerts
-    if ! [ `cat ${OUTPUT} | wc -l` -eq 0 ]; then
-        echo "FAILURE: Alerts found at the general purpose job."
-        EXIT_CODE=1
-    fi
+    check_logs_for_non_empty_out_files
+    EXIT_CODE=$(($EXIT_CODE+$?))
 
     # checks that all apart from the first JM recover the failed jobgraph.
     if ! verify_num_occurences_in_logs 'standalonesession' 'Recovered SubmittedJobGraph' ${JM_FAILURES}; then
diff --git a/flink-end-to-end-tests/test-scripts/test_ha_per_job_cluster_datastream.sh b/flink-end-to-end-tests/test-scripts/test_ha_per_job_cluster_datastream.sh
index 61dd8bc..66a6381 100755
--- a/flink-end-to-end-tests/test-scripts/test_ha_per_job_cluster_datastream.sh
+++ b/flink-end-to-end-tests/test-scripts/test_ha_per_job_cluster_datastream.sh
@@ -69,10 +69,8 @@ function verify_logs_per_job() {
     local EXIT_CODE=0
 
     # verify that we have no alerts
-    if ! [ `cat ${OUTPUT} | wc -l` -eq 0 ]; then
-        echo "FAILURE: Alerts found at the general purpose job."
-        EXIT_CODE=1
-    fi
+    check_logs_for_non_empty_out_files
+    EXIT_CODE=$(($EXIT_CODE+$?))
 
     # checks that all apart from the first JM recover the failed jobgraph.
     if ! verify_num_occurences_in_logs 'standalonejob' 'Found 0 checkpoints in ZooKeeper' 1; then