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

Fix invalid connection URLs returned by PostgreSQLContainer (#1976) #2049

Merged
merged 9 commits into from Mar 10, 2020
Merged

Fix invalid connection URLs returned by PostgreSQLContainer (#1976) #2049

merged 9 commits into from Mar 10, 2020

Conversation

pivovarit
Copy link
Contributor

@pivovarit pivovarit commented Nov 8, 2019

Reproduced the bug: 8803fe1

Fix #1976 by overriding PostgreSQLContainer#constructUrlForConnection

Needed to cater for an empty String case regardless of the fact that it breaks the method contract:

queryString – query string parameters that should be appended to the JDBC connection URL. The '?' character must be included

because:

@pivovarit pivovarit marked this pull request as ready for review November 8, 2019 15:52
@pivovarit pivovarit changed the title Fix invalid URLs returned by PostgreSQLContainer (#1976) Fix invalid connection URLs returned by PostgreSQLContainer (#1976) Nov 8, 2019
@bsideup bsideup added this to the next milestone Jan 27, 2020
@bsideup bsideup merged commit 16fda42 into testcontainers:master Mar 10, 2020
@bsideup
Copy link
Member

bsideup commented Mar 10, 2020

@pivovarit merged 🎉 thank you!

@rnorth
Copy link
Member

rnorth commented Apr 13, 2020

This was released in https://github.com/testcontainers/testcontainers-java/releases/tag/1.14.0 🎉

Thanks for the contribution!

rnorth added a commit that referenced this pull request May 22, 2020
quincy pushed a commit to quincy/testcontainers-java that referenced this pull request May 28, 2020
…stcontainers#1976) (testcontainers#2049)

* Reproduce testcontainers#1976 in tests

* Override constructUrlForConnection for PostgreSQLContainer

* Lighten PostgreSQLConnectionURLTest

* Lighten PostgreSQLConnectionURLTest

* Cater for base URLs without query strings
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.

JdbcDatabaseContainer. constructUrlForConnection() returning malformed URLs
3 participants