Skip to content

Skipping replace DataSource if has JdbcConnectionDetails not created by DataSourceAutoConfiguration #35125

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

quaff
Copy link
Contributor

@quaff quaff commented Apr 24, 2023

before this commit, @AutoConfigureTestDatabase(replace = NONE) is required for

@DataJpaTest
@Testcontainers
//@AutoConfigureTestDatabase(replace = AutoConfigureTestDatabase.Replace.NONE)
public class ApplicationDataJpaTests {

	@Container
	@ServiceConnection
	static MySQLContainer<?> container = ...

…by DataSourceAutoConfiguration

before this commit, @AutoConfigureTestDatabase(replace = NONE) is required for @Serviceconnection JdbcDatabaseContainer
@wilkinsona
Copy link
Member

Thanks for the suggestion. Unfortunately, I don't think that we can tell if the DataSource should be replaced depending on where the JdbcConnectionDetails have been defined. I would prefer that things are slightly more verbose but hopefully also more clear.

@wilkinsona wilkinsona closed this Apr 24, 2023
@wilkinsona wilkinsona added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants