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

Spring Data modules do not support @Nested tests [DATACMNS-1829] #2244

Closed
spring-projects-issues opened this issue Nov 6, 2020 · 3 comments
Assignees
Labels
status: invalid An issue that we don't feel is valid

Comments

@spring-projects-issues
Copy link

Florent Biville opened DATACMNS-1829 and commented

Spring Framework seems to recently support JUnit 5 @Nested test classes and allow them to inherit the enclosing class configuration (based on my quick reading of spring-projects/spring-framework#19930 and https://github.com/spring-projects/spring-framework/blob/fbb3c5cce73f07679afebbb39980fb971efb9f4f/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/nested/TransactionalNestedTests.java).

However, I have not been able to use that feature with Spring Data.

Specifically, I have tried with Spring Data Neo4j 6.0.0 (via Spring Boot 2.4.0-RC1) in a private repository.
I have the same issue with Spring Data JPA 2.4.0 (via Spring Boot 2.4.0-RC1), as reproducible here: https://github.com/fbiville/spring-data-jpa-nested.

All the instructions to reproduce the issue are described in the aforementioned repository README


Affects: 2.4.1 (2020.0.1)

@spring-projects-issues
Copy link
Author

Mark Paluch commented

Spring Data doesn't contribute to the JUnit test context nor to bootstrap/configure tests. All this is done either by Spring Framework or Spring Boot. @DataJpaTest/@DataNeo4jTest are Spring Boot annotations

@spring-projects-issues
Copy link
Author

Florent Biville commented

Gah, I should have read the fully qualified name before posting here, sorry.
Will open an issue against the appropriate repository then.
Thanks for your quick answer!

@spring-projects-issues
Copy link
Author

Florent Biville commented

Mark Paluch I think you can go ahead and close this.
I posted a comment on a related Spring Boot issue instead: spring-projects/spring-boot#23929 (comment)

@spring-projects-issues spring-projects-issues added the type: enhancement A general enhancement label Dec 30, 2020
@mp911de mp911de closed this as completed Jan 26, 2021
@mp911de mp911de added status: invalid An issue that we don't feel is valid and removed type: enhancement A general enhancement labels Jan 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

2 participants