阻止允许blocking不与Junit5一起工作
我正在使用BlockHound来检测阻止呼叫,我想允许我的自定义方法,但它不起作用,并且仍然丢弃错误。
我将使用junit5与blockhound-junit-platform一起使用,我可以看到呼叫
在控制台上打印,但仍在抛出异常。
@BeforeAll
static void configureBlockHound(){
System.out.println("called");
BlockHound.builder().allowBlockingCallsInside(JWTHelper.class.getName(), "toToken").install();
}
我正在运行测试时,
I am using blockhound to detect blocking calls, I would like to allow my custom methods but its not working and still throwing error.
i am using junit5 with blockhound-junit-platform
@BeforeAll
static void configureBlockHound(){
System.out.println("called");
BlockHound.builder().allowBlockingCallsInside(JWTHelper.class.getName(), "toToken").install();
}
When i run the test i can see called
printed on console but still throwing exception.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先尝试以“仅对”模式运行阻止猎犬以了解根本原因。
Try to run blockhound in "log-only" mode first to understand the root cause.