僵尸.js和socket.io (node.js)
我想使用 Zombie.js 无头浏览器测试我的 Node.js/socket.io 应用程序。
不幸的是,当僵尸.js 应用程序连接到我的应用程序时,它会报告大量连接/断开连接事件。
例如。
Zombie: Firing timeout 234, delay: 1000
Zombie: GET http://localhost:8000/socket.io/1/?t=1313487267750&jsonp=68
Zombie: GET http://localhost:8000/socket.io/1/?t=1313487267724&jsonp=69
connected
connected
connected
Zombie: Firing timeout 237, delay: 2000
Zombie: Firing timeout 226, delay: 16000
Zombie: Firing timeout 218, delay: 25000
disconnected
僵尸似乎不尊重超时延迟,所以我想知道这是否是一个原因?
有没有人尝试过将僵尸与socket.io一起使用,或者可以告诉我为什么僵尸似乎立即触发超时而不是等待规定的时间?
I would like to test my node.js/socket.io application using the zombie.js headless browser.
Unfortunately when the zombie.js app connects to my app it reports a load of connection/disconnection events.
Eg.
Zombie: Firing timeout 234, delay: 1000
Zombie: GET http://localhost:8000/socket.io/1/?t=1313487267750&jsonp=68
Zombie: GET http://localhost:8000/socket.io/1/?t=1313487267724&jsonp=69
connected
connected
connected
Zombie: Firing timeout 237, delay: 2000
Zombie: Firing timeout 226, delay: 16000
Zombie: Firing timeout 218, delay: 25000
disconnected
It seems Zombie doesn't respect timeout delays, so I wonder if this could be a cause?
Has anyone tried using zombie with socket.io or can tell me why zombie seems to fire timeouts immediately rather than waiting the stated time?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
总结一下:我按照 @Raynos 的推荐使用了 Phantomjs,效果很好。
To wrap this up: I used Phantomjs as recommended by @Raynos which works nicely.