Skip to content
代码片段 群组 项目
提交 a8abf6da 编辑于 作者: Stan Hu's avatar Stan Hu
浏览文件

Fix file descriptor leak with Capybara

When Capybara is used in a debugger in feature specs, developers will
often see "Too many open files". As described in
https://github.com/teamcapybara/capybara/issues/2322, it appears that
this may be an issue with WebMock, which stops `Net::HTTP.start` from
connecting. If you start a connection and issue multiple requests with
it, WebMock will create a new connection per request.

Setting `net_http_connect_on_start: true` appears to fix the problem:
https://github.com/bblimke/webmock/blob/master/README.md

Many specs depending on the behavior of WebMock stubbing
Net::HTTP.start, so use the WebMock default behavior in most cases and
enable it only for feature specs. Kubeclient needs an exception because
as well, so add a :kubeclient label for this.
上级 b806be2b
No related branches found
No related tags found
加载中
加载中
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册