[英]WDIO 5 : Possible EventEmitter memory leak detected
I have a webdriverio test framework with maxInstance of the browser set to 10. When I run my script, I get the below error message 我有一个webdriverio测试框架,浏览器的maxInstance设置为10.当我运行我的脚本时,我收到以下错误消息
[local-test] (node:20572) MaxListenersExceededWarning: Possible EventEmitter memory leak detected.
[local-test](node:20572)MaxListenersExceededWarning:检测到可能的EventEmitter内存泄漏。 11 end listeners added.
11名最终听众补充道。 Use emitter.setMaxListeners() to increase limit
使用emitter.setMaxListeners()来增加限制
How can I get this fixed? 我怎样才能解决这个问题? I read some information online that I can suppress this warning by either process.setMaxListeners(10);
我在线阅读了一些信息,我可以通过process.setMaxListeners(10)来抑制这个警告。 or emitter.setMaxListeners(10) adding to the wdio.conf.js file;
或者emitter.setMaxListeners(10)添加到wdio.conf.js文件;
But none of the fixed the issue. 但没有解决问题。 Also I do not want to suppress the warning and want to see if there is a way to do a clean fix?
此外,我不想压制警告,并想看看有没有办法做一个干净的修复? Kindly let me know.
请告诉我。
PS : Its webdriverio / Mocha driven test automation framework and there is no database involved. PS:它的webdriverio / Mocha驱动的测试自动化框架,没有涉及数据库。 Also I googled similar answers and it did not help.
我也搜索了类似的答案,但没有帮助。
please refer this Node js documentation where it says under EventEmitter.defaultMaxListeners 请参阅EventEmitter.defaultMaxListeners下的Node js文档
The EventEmitter instance will allow more listeners to be added but will output a trace warning to stderr indicating that a "possible EventEmitter memory leak" has been detected.
It means we will get the warning message for such scenarios 这意味着我们将收到针对此类方案的警告消息
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.