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
We were seeing some flaky tests when we were using testcontainers to run a container (clickhouse, but not using the testcontainer clickhouse module) in parallel. The patch of this code (unfortunately private, but I can share the patch) that fixed it is:
The fix was talking to the container directly, and bypassing host networking entirely.
Before this change, the behavior I was seeing that, during runs of four tests in the same module (each test also has a t.Parallel()), the test would be establishing a connection to clickhouse, running a query, disconnecting and reconnecting to that container and sometimes it would end up in the wrong container.
I did ensure that each test gets its own separate container (spent a few hours sanity checking myself here), and that the tests never reuse any existing container.
Relevant log output
No response
Additional information
No response
The text was updated successfully, but these errors were encountered:
Testcontainers version
v0.33.0
Using the latest Testcontainers version?
Yes
Host OS
Darwin
Host arch
ARM
Go version
1.22
Docker version
Client: Version: 26.1.3 API version: 1.45 Go version: go1.21.10 Git commit: b72abbb Built: Thu May 16 08:30:38 2024 OS/Arch: darwin/arm64 Context: orbstack Server: Docker Engine - Community Engine: Version: 26.1.4 API version: 1.45 (minimum version 1.24) Go version: go1.21.11 Git commit: de5c9cf Built: Wed Jun 5 11:29:18 2024 OS/Arch: linux/arm64 Experimental: false containerd: Version: v1.7.19 GitCommit: 2bf793ef6dc9a18e00cb12efb64355c2c9d5eb41 runc: Version: 1.1.13 GitCommit: 58aa9203c123022138b22cf96540c284876a7910 docker-init: Version: 0.19.0 GitCommit: de40ad0
Docker info
What happened?
We were seeing some flaky tests when we were using testcontainers to run a container (clickhouse, but not using the testcontainer clickhouse module) in parallel. The patch of this code (unfortunately private, but I can share the patch) that fixed it is:
The fix was talking to the container directly, and bypassing host networking entirely.
Before this change, the behavior I was seeing that, during runs of four tests in the same module (each test also has a t.Parallel()), the test would be establishing a connection to clickhouse, running a query, disconnecting and reconnecting to that container and sometimes it would end up in the wrong container.
I did ensure that each test gets its own separate container (spent a few hours sanity checking myself here), and that the tests never reuse any existing container.
Relevant log output
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: