mqliang commented on a change in pull request #6959:
URL: https://github.com/apache/incubator-pinot/pull/6959#discussion_r638087258



##########
File path: compatibility-verifier/compCheck.sh
##########
@@ -48,27 +50,62 @@ function usage() {
 }
 
 function waitForZkReady() {
-  # TODO: check ZK to be ready instead of sleep
-  sleep 60
-  echo "zookeeper is ready"
+  status=1
+  while [ $status -ne 0 ]; do
+    sleep 1
+    echo Checking port 2181 for zk ready
+    echo x |nc localhost 2181 1>/dev/null 2>&1
+    status=$(echo $?)
+  done
 }
 
 function waitForControllerReady() {
-  # TODO: check Controller to be ready instead of sleep
-  sleep 60
-  echo "controller is ready"
+  # TODO: Check real controller port if config file is specified.
+  status=1
+  while [ $status -ne 0 ]; do
+    sleep 1
+    echo Checking port 9000 for controller ready
+    curl localhost:9000/health 1>/dev/null 2>&1
+    status=$(echo $?)
+  done
 }
 
 function waitForKafkaReady() {
-  # TODO: check kafka to be ready instead of sleep
-  sleep 10
-  echo "kafka is ready"
+  status=1
+  while [ $status -ne 0 ]; do
+    sleep 1
+    echo Checking port 19092 for kafka ready
+    echo x |nc localhost 19092 1>/dev/null 2>&1
+    status=$(echo $?)
+  done
+}
+
+function waitForBrokerReady() {
+# TODO We are checking for port 8099. Check for real broker port from config 
if needed.
+  local status=1
+  while [ $status -ne 0 ]; do
+    sleep 1
+    echo Checking port 8099 for broker ready
+    curl localhost:8099/debug/routingTable 1>/dev/null 2>&1
+    status=$(echo $?)
+  done
+}
+
+function waitForServerReady() {
+  # TODO We are checjing for port 8097. Check for real server port from config 
if needed,

Review comment:
       typo: checjing-> checking




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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to