-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Mockito fails to mock non-public inner class in continuous testing due to classloading issues #38987
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
Comments
/cc @geoand (testing), @stuartwdouglas (continuous-testing) |
I just found out it worked with 3.1.3.Final and broke with 3.2.0.CR1. |
Reverting 13103ee fixes it! It also fixes my non-inner class case (which had other issues after adding /cc @stuartwdouglas |
The mentioned commit has this note:
I'm wondering whether we had any concrete issues with specific extensions. The PR doesn't link anything in that regard. /cc @geoand |
Yeah, I am wondering the same... |
FWIW, reverting causes a couple of test failures in |
I think this is the root cause of that test failure (after the revert):
/cc @mkouba |
Well, I don't think there's something we could fix in ArC or in QuarkusComponentTest 🤷. |
Hi @holly-cummins, this might be something for WG - Test classloading |
Is this still an issue with Quarkus |
I've confirmed that this still fails with 3.18.1, but passes with my WG - Test classloading branch. (Yay!). We should perhaps add a test with the reproducer. I have mixed feelings since every test we add slows down the build, but I think we need to have more coverage of some of these continuous testing scenarios. |
+1 for adding tests of cases that were known to not work but your PR fixes |
Reproducer added in #46793. |
Describe the bug
The following primitive test (and tested class):
works fine in IDE or mvn, but fails with
mvn quarkus:test
:Expected behavior
No failure, should work as in IDE or mvn.
Actual behavior
Fails with classloading issue.
How to Reproduce?
mvn clean verify
(passes)mvn quarkus:test
failsOutput of
uname -a
orver
No response
Output of
java -version
No response
Quarkus version or git rev
3.7.4
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
The problem vanishes after adding
public
to the inner class.I have another case where adding
public
helps, but that's not an inner class.It has been an issue for many releases now, I just haven't found the time to report it.
I'm rather sure (IIRC) it was actually working some months ago.
The text was updated successfully, but these errors were encountered: