Skip to content

Flyway and Liquibase auto-configuration does not consider DataSource properties configured via @AutoConfigureTestDatabase #16814

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

Closed
wants to merge 1 commit into from

Conversation

deakandris
Copy link
Contributor

@deakandris deakandris commented May 9, 2019

Both Flyway and Liquibase makes use of DataSourceProperties to get default properties.
However both uses strictly the configuration properties and fail to consider
embedded datasource properties autoconfigured by @AutoConfigureTestDatabase.
In case a database layer test e.g. @JdbcTest relies on the autoconfigured
embedded datasource, Flyway and Liquibase autoconfiguration fails
as they are not aware of the embedded datasource properties.

@pivotal-issuemaster
Copy link

@deakandris Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 9, 2019
@pivotal-issuemaster
Copy link

@deakandris Thank you for signing the Contributor License Agreement!

Both Flyway and Liquibase makes use of DataSourceProperties to get default properties.
However both uses strictly the configuration properties and fail to consider
embedded datasource properties autoconfigured by @AutoConfigureTestDatabase.
In case a database layer test e.g. @jdbcTest relies on the autoconfigured
embedded datasource, Flyway and Liquibase autoconfiguration fails
as they are not aware of the embedded datasource properties.
@deakandris
Copy link
Contributor Author

I have no idea why DefaultErrorWebExceptionHandlerIntegrationTests.responseCommitted test fails. I could use some guidance how it's related to my changes. 😕

@philwebb philwebb added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels May 14, 2019
@philwebb philwebb added this to the 2.1.x milestone May 14, 2019
@wilkinsona wilkinsona self-assigned this Jun 17, 2019
@wilkinsona wilkinsona changed the title fix flyway and liquibase autoconfig with embedded datasource Flyway and Liquibase auto-configuration does not consider DataSource properties configured via @AutoConfigureTestDatabase Jun 17, 2019
wilkinsona pushed a commit that referenced this pull request Jun 17, 2019
Both Flyway and Liquibase makes use of DataSourceProperties to get
default properties. Previously, both used strictly the configuration
properties and failed to consider embedded datasource properties
autoconfigured by @AutoConfigureTestDatabase. In case a database layer
test e.g. @jdbcTest relies on the autoconfigured embedded datasource,
Flyway and Liquibase autoconfiguration fails as they are not aware of
the embedded datasource properties.

See gh-16814
@wilkinsona wilkinsona modified the milestones: 2.1.x, 2.1.6 Jun 17, 2019
@wilkinsona
Copy link
Member

Thank you very much for making your first contribution to Spring Boot, @deakandris.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants