-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
No idea if this is a IntelliJ, Gradle or JUnit issue. I've tried with both JUnit 5.4 and 5.7 - same issue. Ditto for JUnit 4 btw
For a reproducer, this is happening with the Hibernate project (http://github.com/hibernate/hibernate-orm) with the wip/6.0
branch. Totally understand if you want a smaller reproducer - let me know.
I played around a little bit to see if I could narrow down possible causes. It seems like the projects that have multiple test tasks (how we expose testing the different available databases) are the ones experiencing this problem. That is most of the Java sub-projects.
To reproduce:
- Set IntelliJ to run tests using Gradle (Settings > Build, Execution, Deployment > Build tools > Gradle : "Run tests using : Gradle"). I see the same behavior with "Chose per test"
- Select an individual test class/method from a Java sub-project (e.g.
hibernate-core
) and run or debug it
I expect the tests to run. IJ fails to find them. E.g.
Execution failed for task ':documentation:matrix_derby'.
> No tests found for given includes: [org.hibernate.userguide.mapping.basic.NationalizedStringMappingTests](filter.includeTestsMatching)
As a counter-point, if you use that same IJ set-up and try to do the same with tests in the hibernate-testing
sub-project, it works fine. That project has just the one test task.