“Selector loop waiting on select” when running multiple test cases which use wiremock stubs

妖精的绣舞 提交于 2019-12-10 13:34:18

问题


I'm using wiremock for mocking a web service. I'm using that to provide a service access to some of units that we are testing. So basically we have multiple junit tests which use stubs from wiremock.

But when we run multiple tests at once (let's say run a whole test.java file) it will keep waiting after it completed some of the test cases. And something like following will be displayed at the bottom of the log,

[qtp1669854350-14-selector-ServerConnectorManager@62dfb098/0]
 DEBUG org.eclipse.jetty.io.SelectorManager - Selector loop waiting on select

Junit version : 4.12
Wiremock version : 2.5.0 (wiremock-standalone)
Java version : 1.8.0_77

Also I checked this SO problem. But still can't figure out how to overcome this.


回答1:


That message is probably a red herring. I suggest grabbing a thread dump during a pause (kill -3 on *nix). That will tell you where exactly the code is blocking.



来源:https://stackoverflow.com/questions/41888535/selector-loop-waiting-on-select-when-running-multiple-test-cases-which-use-wir

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!