Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added new postgres constructor to allow additional wait strategies #6309

Closed
wants to merge 1 commit into from

Conversation

johnB96
Copy link

@johnB96 johnB96 commented Dec 16, 2022

We ran into this issue with migrating off docker desktop and using rancher desktop, colima, and podman.

rancher-sandbox/rancher-desktop#2609
quarkusio/quarkus#25682

We found the fix would be to wait for ports to become available, however, that overrides the existing wait strategy. Ideally, a new constructor would be available that joins a custom wait strategy with the existing wait strategy.

The unit test demonstrates what basically works, adding an additional wait for exposed ports. I have verified adding that wait with the existing wait fixes this issue.

Also, as more devs migrate off docker desktop, this issue will likely impair devs so getting a convenient fix is prudent.

@eddumelendez
Copy link
Member

Hi @johnB96 , thanks for the PR. We have received some reports regarding to this and we are also following the upstream issues in rancher and similar vendors. See #5986 (comment)

Also, sharing the same comment here

Testcontainers requires a Docker-API compatible container runtime. During development, Testcontainers is actively tested against recent versions of Docker on Linux, as well as against Docker Desktop on Mac and Windows.
These Docker environments are automatically detected and used by Testcontainers without any additional configuration being necessary.

It is possible to configure Testcontainers to work for other Docker setups, such as a remote Docker host or Docker alternatives. However, these are not actively tested in the main development workflow, so not all Testcontainers features might be available and additional manual configuration might be necessary. If you have further questions about configuration details for your setup or whether it supports running Testcontainers-based tests, please contact the Testcontainers team and other users from the Testcontainers community on Slack:

Join our Slack team

We have tested the port availability in both docker/rancher desktop and got the numbers below:

Docker desktop

real	0m0.003s
user	0m0.000s
sys	0m0.002s

Rancher desktop

real	0m3.046s
user	0m0.005s
sys	0m0.022s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants