Skip to content

Reduce the need for @AutoConfigureTestDatabase(replace=NONE) when using a test-provided database #35253

@wilkinsona

Description

@wilkinsona

If a test class is using @ServiceConnection to create a test-specific DataSource, @DataJpaTest or any other sliced-test annotation that uses @AutoConfigureTestDatabase will replace it with an embedded database due to its default replacement policy of ANY. I believe the same problem will occur with @DynamicPropertySource so this problem isn't particularly new. That said we may not be able to fix it in maintenance releases, it'll depend on the nature and complexity of any fix. Assigning to 3.1.x for now.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions