Skip to content

TestDatabaseAutoConfiguration replacing existing DataSource doesn't respect primary #7304

@jklap

Description

@jklap

Spring 1.4.1

Two DataSource beans, one marked as Primary.

When running a test using DataJpaTest, TestDatabaseAutoConfiguration will look for, and replace the DataSource bean that has been marked as primary with the created embedded database DataSource but does not then mark that replacement bean as primary. The issue looks to be in TestDatabaseAutoConfiguration .EmbeddedDataSourceBeanFactoryPostProcessor.process()

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions