This repository has been archived by the owner on Feb 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 354
Add support for Mockito #1063
Labels
status: blocked
An issue that's blocked on an external project change or another issue
Comments
spring-projects-issues
added
the
status: waiting-for-triage
An issue we've not yet triaged or decided on
label
Sep 23, 2021
Hey, thanks for raising this. For hints curious, they should. But maybe you could first try to make a POC without Spring Native involved to check it works with GraalVM 21.2 + native build tools JUnit support? As a second step we could have a look on Spring side. |
sdeleuze
added
the
status: waiting-for-feedback
We need additional information before we can continue
label
Sep 23, 2021
Ok, I'll see if I find some time tomorrow to get a working setup. I really would like to see this working. |
spring-projects-issues
added
status: feedback-provided
Feedback has been provided
and removed
status: waiting-for-feedback
We need additional information before we can continue
labels
Sep 23, 2021
sdeleuze
added
status: blocked
An issue that's blocked on an external project change or another issue
and removed
status: waiting-for-triage
An issue we've not yet triaged or decided on
status: feedback-provided
Feedback has been provided
labels
Nov 3, 2021
sdeleuze
changed the title
Add support for @MockBean with jdk proxies
Add support for Mockito
Dec 20, 2021
Mockito support need to be added at Spring AOT level, see related this related comment. |
sdeleuze
added a commit
that referenced
this issue
Dec 20, 2021
Since Mockito Definition parameters are not supported yet and Mockito unsupported on native for now (see gh-1063), MockitoPostProcessor should be excluded in order to throw a more meaningful "NoSuchBeanDefinitionException: No qualifying bean of type 'MockitoPostProcessor' available" error rather than the current "IllegalArgumentException: Code should not be empty" one. This commit also updates the support documentation to explicitly mention that Mockito is unsupported at this stage. Closes gh-1343
GraalVM team is working actively on that, so I close the issue on Spring Native side. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Mockito has a new feature that allows disabling byte code generation and working with jdk proxies instead (of course limited to interfaces)
It has to be activated by creating a file called
mockito-extensions/org.mockito.plugins.MockMaker
with a content of
mock-maker-proxy
I seriously tried to make this work, but it seems like the typehints do not count for test classes.
Do you think this could be an option to be supported?
The text was updated successfully, but these errors were encountered: