testcontainers-go
testcontainers-go copied to clipboard
fix: Following Container Logs feature fixes
- fix the doc:
c.FollowOutput()MUST be called beforec.StartLogProducer()due to date race - do not allow multiple
c.StartLogProducer()without calling ac.StopLogProducer() - run
c.StopLogProducer()inc.Terminate()to reduce risk of an accidental goroutine leak - fix tests, write new tests
Hey @slsyy there is one failing test on CI: https://github.com/testcontainers/testcontainers-go/runs/3875582882?check_suite_focus=true
Can you check? 🙏
@mdelapenya I will try in the weekend. Perhaps problem is somewhere in the StartLogProducer. The logic is so weird, that I need to some time to analyse it: for example we reopen connection every 5 seconds due to usage of ctx, cancel := context.WithTimeout(ctx, time.Second*5), which is weird. Other problem, which I have found during testing in my private project is a CPU usage: StartLogProducer was responsible for ~90%, which also seems weird for such an ancillary operation
The logic is so weird, that I need to some time to analyse it: for example we reopen connection every 5 seconds due to usage of
ctx, cancel := context.WithTimeout(ctx, time.Second*5), which is weird.
Interesting, maybe we can open a separate issue, or a discussion to improve that logic.
Other problem, which I have found during testing in my private project is a CPU usage:
StartLogProducerwas responsible for ~90%, which also seems weird for such an ancillary operation
Again interesting, could you please provide more info in an issue so we can trace and try to resolve it if possible? 🙏
@slsyy I'd like to start the review of this PR but I see merge conflicts on it. Would you mind resolving it? 🙏 Thanks!
Deploy Preview for testcontainers-go ready!
| Name | Link |
|---|---|
| Latest commit | 235797f485ca945c34c644b65eb9b45b08173da2 |
| Latest deploy log | https://app.netlify.com/sites/testcontainers-go/deploys/641b294e388b7f0008313d51 |
| Deploy Preview | https://deploy-preview-366--testcontainers-go.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
@slsyy I went ahead and resolved the conflicts myself on top of your commits.
Do you mind adding a review to verify if your initial intention is not modified?
Thanks in advance







