-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Gradle 1.7.0.CR1 regression: Gradle project does not work with test-fixtures plugin anymore #11144
Comments
/cc @quarkusio/devtools, @glefloch |
Thanks for reporting, the |
@glefloch as it's a regression, it would be nice to get this fixed for the Final, which means to merge a fix before Thursday evening. Is it OK for you? |
Yes I'm on it, I should be able to create the pull request tonight |
@aloubyansky, I thought adding the |
I will. |
Just fyi, here is a dirty way of fixing the classloading issue
|
The classes from |
There are other (primarily Gradle-related) issues about recognizing and/or adding more test paths there. This is not the way we want to evolve. We need to properly integrate build system-specific (maven/gradle) workspace paths in here instead adding hacks. |
For 1.7.0.Final I guess we can live with this kind of quick fix, given that it's too late to introduce major changes. |
This is a partial fix for quarkusio#11144. At present QuarkusTestExtension essentually guesses where the test classes are, and these are used to build the ClassLoader. The Gradle resolver can add additional paths to the AppArtifact (e.g. the testFixtures path), however they will not actuall end up in the ClassLoader which causes problems.
This is a partial fix for quarkusio#11144. At present QuarkusTestExtension essentually guesses where the test classes are, and these are used to build the ClassLoader. The Gradle resolver can add additional paths to the AppArtifact (e.g. the testFixtures path), however they will not actuall end up in the ClassLoader which causes problems.
Describe the bug
In #10327 I was directed to use java-test-fixtures plugin for reused test resources. I am happily using it now. Unfortunately with 1.7.0.CR1 this stopped working. Reproducer can be found here: https://github.com/asodja/quarkus-test-fixtures-reproducer.
When running tests inside IDE (with Intellij Runner) I get:
And when I run
gradle test
from terminal I get:Of course if I do
gradle build
and then run inside IntelliJ I get the same error as withgradle test
, since jar is present in build directory.Expected behavior
Test works and passes, no exception is thrown.
Actual behavior
Exception is thrown, test fails.
To Reproduce
Steps to reproduce the behavior:
gradle test
, it also failsgradle test
again, it passesEnvironment (please complete the following information):
uname -a
orver
: MacBook Pro, Darwin Kernel Version 19.5.0java -version
: openjdk version "1.8.0_242"Off topic, thank you for implementing #8737. As I follow there is still some work to do, like model caching etc, to have speed of running maven project from Intellij. But it looks like the first big step is done. Using IntelliJ runner really makes a difference when dealing with big projects, since Gradle initialization can be slow.
The text was updated successfully, but these errors were encountered: