-
Notifications
You must be signed in to change notification settings - Fork 98
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
Mockito.mock fails with BlockHound #152
Comments
@bsideup any chance releasing a |
ah sorry ignore me.. just seen this #70 (comment) |
as a side note, adding JNA to classpath made no difference. |
This is weird. Adding JNA makes ByteBuddy prefer the emulated attachment strategy, and it should work fine. Since Mockito is maintained by the same person who created ByteBuddy, I would say reporting the issue to them would be the best play. The reproducer can be simplified to:
no need to use the junit jupiter integration actually |
Mockito.mock
fails whenblockhound-junit-platform
is added to project dependencies.Expected Behavior
Removing
blockhound-junit-platform
from dependencies makes the tests pass. I'd expect tests to pass with BlockHound.Actual Behavior
Steps to Reproduce
Possible Solution
Looks like
Byte Buddy
dependency pulled transitively bymockito-core
doesn't play nicely with the shaded copy ofByte Buddy
included inBlockHound
library.Your Environment
io.projectreactor.tools:blockhound-junit-platform:jar:1.0.4.RELEASE
org.mockito:mockito-core:jar:3.3.3
(viaorg.springframework.boot:spring-boot-starter-test:jar:2.3.4.RELEASE
)org.springframework.boot:spring-boot-starter-reactor-netty:jar:2.3.4.RELEASE
(viaorg.springframework.boot:spring-boot-starter-webflux:jar:2.3.4.RELEASE
)io.projectreactor:reactor-test:jar:3.3.10.RELEASE
The text was updated successfully, but these errors were encountered: