-
Notifications
You must be signed in to change notification settings - Fork 31
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
When verifying SpykBean's, verification acknowledgement fails #88
Comments
My guess is that it's the same issue as #85. But I'm still waiting for a minimal repro or test case allowing me to debug (and hopefully fix) the issue. |
hello. sure thing, please take a look at this minimal PoC https://github.com/slawek-mazur/mockk-spykbean it is indeed related to that enrichment if I comment out like so 👇 there's no AOP and CGLIB doesn't kick in with it's proxies.
|
@slawek-mazur thanks for the repro. You're indeed hitting the same issue with AOP-modified Spring beans which exists since day 1 (see the first limitation listed in the README), and that I have no idea how to fix. Sorry for that. There's a test case, BTW, that comes from Spring Boot and which is disabled because it fails, see https://github.com/Ninja-Squad/springmockk/blob/master/src/test/kotlin/com/ninjasquad/springmockk/SpyBeanWithAopProxyTests.kt#L39). In your specific case, you should be able to workaround the issue by using Unless someone can finally find a solution for this, my only advice would be to find a workaround. I generally thend to avoid spies in the first place. |
Fair enough, thanks for the support. |
in test
it works perfectly fine when
The text was updated successfully, but these errors were encountered: