-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
DeGraph should not be run as part of test task #481
Comments
Thanks for raising the issue and working on a fix! I've slated this for M3 with the hope that we can get it in by then. Otherwise, we'll just push it back to M4. |
By the way, we are very aware of how long that "test" takes. That's why we moved it to a dedicated project in the first place. And that's why I practically always execute |
Yes, but such "secret knowledge" should not be necessary to get a good dev experience :) In this case a dedicated task is the right solution. More generally though, if you have expensive tests (let's say integration tests), you should create a custom sourceSet for those. The default |
I really would like to have a Gradle plugin for degraph. I've talked to @schauder (the author of degraph) about it and he would welcome it but does not have time to do it. |
I'll make sure that the fix I'm currently working on will be simple to wrap in a published plugin. So anyone can then pick it up. |
Prior to this commit, the slow DeGraph dependency tests were always executed via the standard Gradle `test` task. The only way to execute all tests without DeGraph was to execute `gradlew test -x :test` which is not very intuitive for most developers. This commit addresses this issue by introducing a new (empty) `degraph` task in the root project which acts as an "alias" for the `junitPlatformTest` task. In addition, the dependency from the standard `test` task to the `junitPlatformTest` task has been removed for the root project, and a dependency from the `check` task to the `degraph` task has been added for the root project. Consequently, executing `gradlew test` will no longer run the DeGraph tests, but executing `gradlew degraph` or `gradlew check` will. Issue: #481
Via some Gradle wizardry, I have already addressed the major concerns of this issue in d268d9f. 😉 Of course, a real plugin for DeGraph would be great. |
The Junit 5 build is currently running DeGraph as a Junit test in
DependencyTests
. This means that someone just running./gradlew test
will also run this very expensive check, even though they probably just were interested in running "real" unit tests.Ignoring this single test cuts test execution time from 25s to 10s on my machine.
I'd suggest writing a dedicated task for DeGraph.
The text was updated successfully, but these errors were encountered: