You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This test spins up a container with either Postgres or MySQL, runs some tests with a server that connects to it, and then terminates the container. Nothing crazy. And at the end of the test I have this:
t.Cleanup(func() {
goleak.VerifyNone(t)
})
to detect any goroutines that were created but not terminated.
So there is something new in testcontainers that is not cleaning properly. The leak happens in both MySQL and Postgres tests. Also it doesn't always occur.
Relevant log output
No response
Additional information
If I may make a recommendation: please add
t.Cleanup(func() {
goleak.VerifyNone(t)
})
to every test that creates goroutines or HTTP connections. It's proven to be invaluable in our codebase to detect leaks.
The text was updated successfully, but these errors were encountered:
Testcontainers version
v0.32.0
Using the latest Testcontainers version?
Yes
Host OS
MacOS
Host arch
ARM
Go version
1.22.5
Docker version
Client: Version: 27.0.3 API version: 1.46 Go version: go1.21.11 Git commit: 7d4bcd8 Built: Fri Jun 28 23:59:41 2024 OS/Arch: darwin/arm64 Context: desktop-linux Server: Docker Desktop 4.32.0 (157355) Engine: Version: 27.0.3 API version: 1.46 (minimum version 1.24) Go version: go1.21.11 Git commit: 662f78c Built: Sat Jun 29 00:02:44 2024 OS/Arch: linux/arm64 Experimental: false containerd: Version: 1.7.18 GitCommit: ae71819c4f5e67bb4d5ae76a6b735f29cc25774e runc: Version: 1.7.18 GitCommit: v1.1.13-0-g58aa920 docker-init: Version: 0.19.0 GitCommit: de40ad0
Docker info
What happened?
I attempted an upgrade in our codebase from v0.30.0 to v0.32.0. My codebase uses
And after the upgrade, one of my tests is failing:
This test spins up a container with either Postgres or MySQL, runs some tests with a server that connects to it, and then terminates the container. Nothing crazy. And at the end of the test I have this:
to detect any goroutines that were created but not terminated.
So there is something new in
testcontainers
that is not cleaning properly. The leak happens in both MySQL and Postgres tests. Also it doesn't always occur.Relevant log output
No response
Additional information
If I may make a recommendation: please add
to every test that creates goroutines or HTTP connections. It's proven to be invaluable in our codebase to detect leaks.
The text was updated successfully, but these errors were encountered: