-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
testfix: give kafka longer to startup #1693
Conversation
For some reason we'd ended up with quite a short (10s) limit on waiting for Kafka to startup and open its listener and since moving from Travis to GitHub actions, this can periodically take longer causing the build to abort early. Bump it up to 2m and tweak a couple of other parts of the boot script.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple of questions
while ! nc -q 1 localhost 2181 </dev/null; do echo "Waiting"; sleep 1; done | ||
while ! nc -q 1 localhost 9092 </dev/null; do echo "Waiting"; sleep 1; done | ||
while ! nc -q 1 localhost 2185 </dev/null; do echo "Waiting"; sleep 1; done | ||
while ! nc -q 1 localhost 9095 </dev/null; do echo "Waiting"; sleep 1; done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Were these ports change intended ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah these nc
polls are waiting for toxiproxy to have completed its startup. However, it starts 5 zookeeper listeners and 5 kafka listeners so it makes sense to poll the highest port numbers (which are created last) for zk-5 and kafka-5 respectively
RC=1 | ||
set +x | ||
printf "Waiting for Kafka to become available." | ||
printf "Waiting for kafka5 to become available." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the 5 intended or a typo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intended, the nc
poll in this block is only querying the fifth broker in the cluster, known as "kafka5" in the toxiproxy config and toxi port 9095
--> kafka port 29095
For some reason we'd ended up with quite a short (10s) limit on waiting
for Kafka to startup and open its listener and since moving from Travis
to GitHub actions, this can periodically take longer causing the build
to abort early. Bump it up to 2m and tweak a couple of other parts of
the boot script.