Closed
Description
JdbcDatabaseContainer. constructUrlForConnection() is a simple method that concatenates JDBC URL and a query string starting with ?
.
But PostgreSQLContainer. getJdbcUrl ()
returns a JDBC URL with the query string ?loggerLevel=OFF
(The change was introduced from this PR: https://github.com/testcontainers/testcontainers-java/pull/1434/files#diff-d62130004eb8d994f60b87f95b1488be)
This returns invalid URLs for PostgreSQLContainer
s with custom parameters. For example, given the following URL:
jdbc:tc:fevopostgresql:9.6.11://hostname/databasename?stringtype=unspecified
,
the produced connection URL is
jdbc:postgresql://localhost:32793/databasename?loggerLevel=OFF?stringtype=unspecified
instead of ...&stringtype=unspecified