XComp commented on a change in pull request #13248:
URL: https://github.com/apache/flink/pull/13248#discussion_r478218263



##########
File path: flink-end-to-end-tests/test-scripts/kafka-common.sh
##########
@@ -59,13 +59,29 @@ function setup_confluent_dist {
   sed -i -e 
"s#listeners=http://0.0.0.0:8081#listeners=http://0.0.0.0:${SCHEMA_REGISTRY_PORT}#";
 $CONFLUENT_DIR/etc/schema-registry/schema-registry.properties
 }
 
+function wait_for_zookeeper_running {
+  while $KAFKA_DIR/bin/zookeeper-shell.sh localhost:2181 get /testnonexistent 
2>&1 | grep -q "Connection refused"; do
+    echo "waiting for zookeeper to start."
+    sleep 1
+  done

Review comment:
       Shouldn't we add a counter here? Otherwise we'd create an infinite loop 
if the zookeeper startup fails. The old implementation would have ended up 
exiting in the [while 
loop](https://github.com/apache/flink/pull/13248/files#diff-3a25c674bfb7f722ef91f6b8630e56f4R99)
 in such a case. I think, we don't reach that one in case of a missing 
ZooKeeper anymore...




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


Reply via email to