Skip to content
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

Add @Sql equivalent support to R2DBC #27485

Closed
yerzhant opened this issue Sep 24, 2021 · 3 comments
Closed

Add @Sql equivalent support to R2DBC #27485

yerzhant opened this issue Sep 24, 2021 · 3 comments
Labels
in: test Issues in the test module status: superseded An issue that has been superseded by another type: enhancement A general enhancement

Comments

@yerzhant
Copy link

@Sql annotation is from jdbc package (org.springframework.test.context.jdbc). Could you please make it more general (from jdbc & r2dbc perspective) so that one can do like this:

@DataR2dbcTest
@Sql("scripts/normalize-sheet.sql")

Right now it gives this exception:

...
java.lang.IllegalStateException: Failed to execute SQL scripts for test context [DefaultTestContext@32a13034 testClass
...
contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map['org.springframework.test.context.event.ApplicationEventsTestExecutionListener.recordApplicationEvents' -> false]]: supply at least a DataSource or PlatformTransactionManager.

At the moment one of the workarounds is manual script execution: https://stackoverflow.com/a/64118434/4456087

@mp911de
Copy link
Member

mp911de commented Sep 24, 2021

@sbrannen is that something worth considering in spring-test?

@sbrannen
Copy link
Member

@sbrannen is that something worth considering in spring-test?

Yes, I think so.

And as you pointed out, spring-projects/spring-data-r2dbc#313 is related.

@odrotbohm odrotbohm transferred this issue from spring-projects/spring-data-r2dbc Sep 28, 2021
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 28, 2021
@rstoyanchev rstoyanchev added the in: data Issues in data modules (jdbc, orm, oxm, tx) label Nov 10, 2021
@snicoll snicoll added the in: test Issues in the test module label Nov 13, 2023
@jhoeller jhoeller added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Dec 29, 2023
@jhoeller jhoeller added this to the 6.x Backlog milestone Dec 29, 2023
@jhoeller jhoeller modified the milestones: 6.x Backlog, General Backlog Jun 18, 2024
@bclozel bclozel marked this as a duplicate of #33531 Feb 18, 2025
@bclozel
Copy link
Member

bclozel commented Feb 18, 2025

Closing in favor of #34350

@bclozel bclozel closed this as not planned Won't fix, can't repro, duplicate, stale Feb 18, 2025
@bclozel bclozel added status: superseded An issue that has been superseded by another and removed in: data Issues in data modules (jdbc, orm, oxm, tx) labels Feb 18, 2025
@jhoeller jhoeller removed this from the General Backlog milestone Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test Issues in the test module status: superseded An issue that has been superseded by another type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

8 participants