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

Unable to pass JDBC URL query parameters for PostgreSQLContainer #2389

Closed
Fotonix opened this issue Feb 29, 2020 · 1 comment
Closed

Unable to pass JDBC URL query parameters for PostgreSQLContainer #2389

Fotonix opened this issue Feb 29, 2020 · 1 comment

Comments

@Fotonix
Copy link

Fotonix commented Feb 29, 2020

When you are trying to define a JDBC URL with query parameters the final URL becomes invalid
E.g., the following URL
jdbc:tc:postgresql:9.5://localhost/db?stringtype=unspecified
will become
jdbc:postgresql://localhost:32953/db?loggerLevel=OFF?stringtype=unspecified
This happens because PostgreSQLContainer#getJdbcUrl method has hardcoded ?loggerLevel=OFF query parameter but JdbcDatabaseContainer#constructUrlForConnection uses a simple URL and Query concatenation to create a final URL (getJdbcUrl() + queryString)

@bsideup
Copy link
Member

bsideup commented Mar 2, 2020

Duplicate of #1976

@bsideup bsideup marked this as a duplicate of #1976 Mar 2, 2020
@bsideup bsideup closed this as completed Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants