-
-
Notifications
You must be signed in to change notification settings - Fork 500
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
Bugfix: kafka not found port error #2552
Bugfix: kafka not found port error #2552
Conversation
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
I tried using this for my kafka port not found
error cases, and this fixed the issues I was running into.
c5fb1e2
to
8b27632
Compare
I've tried it and it fixes most of the kafka port not found issues. Thanks! |
This reverts commit 225f6dc. It was done just to undertand the cause and now we can revert it.
3bae926
to
7960122
Compare
Hi @wilsouza thanks for submitting this quick fix to the original issue. Unfortunately, I think we should not add a time.Sleep here as it would not make the code deterministic. I'm working on #2606, which adds a condition to check that all the exposed ports have been already made available by the container runtime, and this check happens before the wait strategies. I'd appreciate your feedback in that issue if possible. So because of that, I'd close this one. |
No worries. I understand. My intent was to solve the issue without altering the core features of Testcontainers. |
What does this PR do?
This PR addresses the Kafka startup failure related to issue #2543. It implements a workaround to ensure that the container maps the ports before attempting to retrieve them.
Why is it important?
This fix resolves a problem in the Kafka module that was causing startup failures due to port mapping issues.
Related issues
How to test this PR