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

delegate getMetadata() to R2DBCDatabaseContainerProvider #2577

Merged
merged 1 commit into from Apr 19, 2020

Conversation

bsideup
Copy link
Member

@bsideup bsideup commented Apr 15, 2020

Apparently, R2DBC ConnectionFactories perform early validation of options, and it fails because the original options (when specified as r2dbc://mysql:///db) miss some required options like host/port/username/password.

After talking to @mp911de, it seems that the checks will stay, so we need to workaround it somehow. I ended up with the delegation to R2DBCDatabaseContainerProvider, because these provides should know which options they add and which are required.

Context:
https://twitter.com/bsideup/status/1250093434817347586?s=20

@@ -68,8 +68,7 @@

@Override
public ConnectionFactoryMetadata getMetadata() {
// TODO check whether it is fine to call it without setting the host/port and other values
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems not 😆

@bsideup bsideup merged commit 3530e63 into master Apr 19, 2020
@delete-merged-branch delete-merged-branch bot deleted the fix_r2dbc_getMetadata branch April 19, 2020 09:11
quincy pushed a commit to quincy/testcontainers-java that referenced this pull request May 28, 2020
…tainers#2577)

Apparently, R2DBC ConnectionFactories perform early validation of options, and it fails because the original options (when specified as `r2dbc://mysql:///db`) miss some required options like host/port/username/password.

After talking to Mark from R2DBC, it seems that the checks will stay, so we need to workaround it somehow. I ended up with the delegation to `R2DBCDatabaseContainerProvider`, because these provides should know which options they add and which are required.
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.

None yet

3 participants