-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[Bug]: Postgres waiting strategy is ineffective. #5986
Comments
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. 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
Rancher desktop
|
The problem is not that it doesn't work with Rancher Desktop... it "just works" with Rancher Desktop If you use ONLY waiting for this log message is not sufficient, even for Docker Desktop. Lines 54 to 58 in 2da2675
The DB needs to be started, but we also should wait for port availability, on any impl of docker. |
Module
PostgreSQL
Testcontainers version
1.17.5
Using the latest Testcontainers version?
Yes
Host OS
macOS
Host Arch
ARM
Docker version
What happened?
When using
PostgreSQLContainer
it doesn't wait long enough and I get the error mentioned below.Putting a small sleep at the beginner of my test method reliably fixes it.
Also, this reliably fixes the issue:
Relevant log output
The text was updated successfully, but these errors were encountered: