You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tw...@apache.org on 2018/07/06 12:53:42 UTC

flink git commit: [FLINK-9659][tests] Replace hard-coded sleeps in bucketing end-to-end test

Repository: flink
Updated Branches:
  refs/heads/master ac5432101 -> f11352167


[FLINK-9659][tests] Replace hard-coded sleeps in bucketing end-to-end test

This PR replaces hard-coded sleeps in the bucketing sink end-to-end test.

Instead we use utility functions to wait for specific events, in this case some progress in the job (measured by number of checkpoints) and the job finishing (by waiting for FINISHED state).

This closes #6210.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/f1135216
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/f1135216
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/f1135216

Branch: refs/heads/master
Commit: f11352167ebee23068fb34639e0fbc8ded6eb998
Parents: ac54321
Author: zentol <ch...@apache.org>
Authored: Mon Jun 25 22:19:02 2018 +0200
Committer: Timo Walther <tw...@apache.org>
Committed: Fri Jul 6 14:51:21 2018 +0200

----------------------------------------------------------------------
 flink-end-to-end-tests/test-scripts/test_streaming_bucketing.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/f1135216/flink-end-to-end-tests/test-scripts/test_streaming_bucketing.sh
----------------------------------------------------------------------
diff --git a/flink-end-to-end-tests/test-scripts/test_streaming_bucketing.sh b/flink-end-to-end-tests/test-scripts/test_streaming_bucketing.sh
index e871916..19da468 100755
--- a/flink-end-to-end-tests/test-scripts/test_streaming_bucketing.sh
+++ b/flink-end-to-end-tests/test-scripts/test_streaming_bucketing.sh
@@ -45,7 +45,7 @@ JOB_ID=$($FLINK_DIR/bin/flink run -d -p 4 $TEST_PROGRAM_JAR -outputPath $TEST_DA
 
 wait_job_running ${JOB_ID}
 
-sleep 40
+wait_num_checkpoints "${JOB_ID}" 5
 
 echo "Killing TM"
 
@@ -70,7 +70,7 @@ $FLINK_DIR/bin/taskmanager.sh start
 $FLINK_DIR/bin/taskmanager.sh start
 
 # the job should complete in under 60s because half of the work has been checkpointed
-sleep 100
+wait_job_terminal_state "${JOB_ID}" "FINISHED"
 
 # get truncate information
 # e.g. "xxx xxx DEBUG xxx.BucketingSink  - Writing valid-length file for xxx/out/result8/part-0-0 to specify valid length 74994"