-
-
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
Unexpected behavior for database containers launched via JDBC URL scheme #2544
Comments
Hi! Same here with postgresql in Testcontainers 1.3.0. In org.testcontainers.containers.JdbcDatabaseContainer#createConnection the
Note the
in one hand, and the |
Disabled until this issue: testcontainers/testcontainers-java#2544
One more thing: I have update the PostgreSQL JDBC driver from version 42.0.0 to 42.2.12. |
@vektory79 your issue seems to be unrelated and fixed in #2049 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you believe this is a mistake, please reply to this comment to keep it open. If there isn't one already, a PR to fix or at least reproduce the problem in a test case will always help us get back on track to tackle this. |
Seems this issue is still valid, it shouldn't be closed. |
This issue has been automatically closed due to inactivity. We apologise if this is still an active problem for you, and would ask you to re-open the issue if this is the case. |
Issue still exists with 1.15.1. |
See #4121 (comment) for a re-prod. This still seems to be broken with |
@chadlwilson thanks for the prompt. We've removed the stale bot altogether, and I've reopened this issue. |
Still a problem in 1.17.6. Could you please update the documentation at least? This cost me a day of effort. |
Can confirm I stumbled upon this also. I have a liquibase script which fails (and very curiously only on second migration, the first gets successfully executed). When adding a hostname:port in the URL, testcontainer correctly creates the database with the expected name and doesn't fail for permissions.
With this url:
and then the liquibase migration fail with the following (see how the the first migration succeeds):
When I change the url to:
|
Version: 1.13.0
Spring Boot: yes
Container: mariadb:10.4
According to Database containers launched via JDBC URL scheme's note:
We will use /// (host-less URIs) from now on to emphasis the unimportance of the host:port pair.
From Testcontainers' perspective, jdbc:mysql:5.7.22://localhost:3306/databasename and jdbc:mysql:5.7.22:///databasename is the same URI.
This URL
jdbc:tc:mariadb:10.4:///users?TC_INITSCRIPT=sql/init.sql
should behave asjdbc:tc:mariadb:10.4://localhost:33306/users?TC_INITSCRIPT=sql/init.sql
The result for the first is URL is:
Waiting for database connection to become available at jdbc:mariadb://localhost:32795/test using query 'SELECT 1'
This results in failed TC_INITSCRIPT due to permissions.
For the second is:
Waiting for database connection to become available at jdbc:mariadb://localhost:32797/users using query 'SELECT 1'
This might be missing from #566 and #617.
The text was updated successfully, but these errors were encountered: