zentol 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_r373028672
##########
File path: flink-end-to-end-tests/test-scripts/kafka-common.sh
##########
@@ -67,10 +68,20 @@ function start_kafka_cluster {
$KAFKA_DIR/bin/zookeeper-server-start.sh -daemon
$KAFKA_DIR/config/zookeeper.properties
$KAFKA_DIR/bin/kafka-server-start.sh -daemon
$KAFKA_DIR/config/server.properties
+ start_time=$(date +%s)
# zookeeper outputs the "Node does not exist" bit to stderr
while [[ $($KAFKA_DIR/bin/zookeeper-shell.sh localhost:2181 get
/brokers/ids/0 2>&1) =~ .*Node\ does\ not\ exist.* ]]; do
- echo "Waiting for broker..."
- sleep 1
+ current_time=$(date +%s)
+ time_diff=$((current_time - start_time))
+
+ if [ $time_diff -ge $MAX_RETRY_SECONDS ]; then
+ echo "Kafka cluster did not start after $MAX_RETRY_SECONDS seconds.
Printing Kafka logs:"
Review comment:
belongs into separate commit
----------------------------------------------------------------
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