GJL commented on a change in pull request #9419: [FLINK-13599][e2e tests] 
Harden test_streaming_kinesis with kinesalite docker image download/run retries
URL: https://github.com/apache/flink/pull/9419#discussion_r312899650
 
 

 ##########
 File path: flink-end-to-end-tests/test-scripts/test_streaming_kinesis.sh
 ##########
 @@ -28,9 +28,26 @@ export AWS_SECRET_KEY=flinkKinesisTestFakeAccessKey
 
 KINESALITE_PORT=4567
 
-#docker run -d --rm --name flink-test-kinesis -p 
${KINESALITE_PORT}:${KINESALITE_PORT} instructure/kinesalite
-# override entrypoint to enable SSL
-docker run -d --rm --entrypoint "/tini" --name flink-test-kinesis -p 
${KINESALITE_PORT}:${KINESALITE_PORT} instructure/kinesalite -- 
/usr/src/app/node_modules/kinesalite/cli.js --path /var/lib/kinesalite --ssl
+function START_KINESALITE {
+    #docker run -d --rm --name flink-test-kinesis -p 
${KINESALITE_PORT}:${KINESALITE_PORT} instructure/kinesalite
+    # override entrypoint to enable SSL
+    docker run -d --rm --entrypoint "/tini" \
+        --name flink-test-kinesis \
+        -p ${KINESALITE_PORT}:${KINESALITE_PORT} \
+        instructure/kinesalite -- \
+        /usr/src/app/node_modules/kinesalite/cli.js --path /var/lib/kinesalite 
--ssl
+}
+
+function KINESALITE_STARTED {
+    if [[ "$(docker ps --format '{{.Names}}' | grep flink-test-kinesis)" = 
"flink-test-kinesis" ]]; then
+        return 0
+    else
+        return 1
+    fi
+}
+
+START_KINESALITE_MAX_RETRY_NUMBER=10
+retry_until_passed_and_wait_condition START_KINESALITE KINESALITE_STARTED 
"start kinesalite" ${START_KINESALITE_MAX_RETRY_NUMBER}
 
 Review comment:
   Were you able to reproduce the problem, and does _"retrying"_ mitigate it?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to