Skip to content
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

Merged
merged 1 commit into from
May 7, 2020
Merged

Conversation

dnwe
Copy link
Collaborator

@dnwe dnwe commented May 7, 2020

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.

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.
@dnwe dnwe requested a review from bai as a code owner May 7, 2020 20:46
Copy link
Contributor

@d1egoaz d1egoaz left a 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
Copy link
Contributor

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 ?

Copy link
Collaborator Author

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."
Copy link
Contributor

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?

Copy link
Collaborator Author

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

@dnwe dnwe merged commit be80e8f into master May 7, 2020
@dnwe dnwe deleted the prevent-build-timeouts branch May 7, 2020 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants