rmetzger commented on a change in pull request #10976: [FLINK-13978][build system] Add experimental support for building on Azure Pipelines URL: https://github.com/apache/flink/pull/10976#discussion_r378777994
########## File path: flink-end-to-end-tests/test-scripts/test_streaming_elasticsearch.sh ########## @@ -39,10 +39,31 @@ on_exit test_cleanup TEST_ES_JAR=${END_TO_END_DIR}/flink-elasticsearch${ELASTICSEARCH_VERSION}-test/target/Elasticsearch${ELASTICSEARCH_VERSION}SinkExample.jar # run the Flink job -$FLINK_DIR/bin/flink run -p 1 $TEST_ES_JAR \ +JOB_ID=$($FLINK_DIR/bin/flink run -d -p 1 $TEST_ES_JAR \ --numRecords 20 \ --index index \ - --type type + --type type | awk '{print $NF}' | tail -n 1) + +# wait for 10 seconds +wait_job_submitted ${JOB_ID} Review comment: This call just waits for the job to be submitted (somehow). The second loop expects the job to be in state "RUNNING". It would fail if the job status was "CREATED", which I assume is a state that we might see. To be honest, I can also undo the changes to the elasticsearch script + the common.sh script. I just left them in in case the tests are failing in the future. With my changes, the tests will at least fail after a few seconds, instead of hanging indefinitely, and they will print the Flink logs to make debugging easier. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services