Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

Add embeded H2 for @DataR2dbcTest #68

Closed
hantsy opened this issue Dec 8, 2019 · 2 comments
Closed

Add embeded H2 for @DataR2dbcTest #68

hantsy opened this issue Dec 8, 2019 · 2 comments

Comments

@hantsy
Copy link

hantsy commented Dec 8, 2019

Like the H2 support for @DataJpaTest , configure an embedded H2 for @DataR2dbcTest to replace the runtime driver if r2dbc-h2 is existed in the dependencies.

        <dependency>
            <groupId>org.springframework.boot.experimental</groupId>
            <artifactId>spring-boot-test-autoconfigure-r2dbc</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.r2dbc</groupId>
            <artifactId>r2dbc-h2</artifactId>
            <scope>test</scope>
        </dependency>

Currently it ignore h2 at all.

@mp911de
Copy link
Collaborator

mp911de commented Dec 8, 2019

That’s currently not possible because the embedded test database API isn’t usable from R2DBC.

Spring Boot configures a DataSource bean that does not allow introspection. Likely, if the R2DBC support gets merged into Spring Boot proper, we will be able to revisit this feature in.

@snicoll
Copy link
Collaborator

snicoll commented Mar 4, 2020

This experimental project has run its course and the features have moved to Spring Boot 2.3 proper. This part isn't implemented though. We brainstormed on how this feature can be improved for the plain jdbc use case and I think it could be applicable to r2dbc as well.

Please watch spring-projects/spring-boot#19038, I've just added a comment.

@snicoll snicoll closed this as completed Mar 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants