Bugfix: kafka not found port error#2552
Bugfix: kafka not found port error#2552wilsouza wants to merge 4 commits intotestcontainers:mainfrom
Conversation
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
AhmedNSidd
left a comment
There was a problem hiding this comment.
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