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_r312887523
 
 

 ##########
 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
 
 Review comment:
   I'd name this: `START_KINESALITE_MAX_RETRIES`. Appending the suffix 
`_NUMBER` seems superfluous. 

----------------------------------------------------------------
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

Reply via email to