Open pkwarren opened 2 months ago
Hi @pkwarren, can you please provide a project that reproduces the issue?
Here's an example repo showing the problem: https://github.com/pkwarren/testcontainers-issue-9120
Thanks for sharing @pkwarren. I did some changes because the docker-compose.yml file was not found and also had to set version but can not reproduce the issue. Do you mind taking a look?
the docker-compose.yml file was not found
It should be here: https://github.com/pkwarren/testcontainers-issue-9120/blob/main/docker-compose.yml
also had to set version
I don't follow - where did a version need to be specified?
can not reproduce the issue. Do you mind taking a look?
If you could provide more specifics on what you're doing and any errors you're seeing I'd be happy to update the example project. For me just running ./mvnw clean verify
hangs - if you use jstack
to look at the PID of the launched Maven surefire process you can see the deadlock.
the docker-compose.yml file was not found
I had to change from ComposeContainer("docker-compose.yml")
to ComposeContainer(new File ("docker-compose.yml"))
I don't follow - where did a version need to be specified?
I was talking about version in docker-compose.yml file. But executing again, I don't need it anymore.
I jus wanted to make sure we have the same code to reproduce. After that, just ran ./mvnw clean verify
and everything executed successfully. I am also running on Mac M1 Pro.
Pushed updates to fix the ComposeContainer
constructor usage and switched the container in docker-compose.yml to be Kafka (in case we're running into a race condition and starting up nginx is too fast to repro the problem). Hopefully this will allow you to see the same behavior I'm seeing.
I'm on the latest version of Docker desktop (v4.33.0) if it matters.
Module
Core
Testcontainers version
1.20.1
Using the latest Testcontainers version?
Yes
Host OS
MacOS
Host Arch
arm64
Docker version
What happened?
I'm attempting to run tests in parallel with JUnit 5. One test spins up a static
ComposeContainer
with.withLocalCompose(true)
and another spins up a staticKafkaContainer
. This leads to a deadlock on startup, where one thread acquires the lock onRyukResourceReaper
and then fails to acquire the lock inDockerClientFactory
, while the other thread does the opposite.Relevant log output
Kafka container thread:
Compose container thread:
Additional Information
No response