karma-runner / karma-runner/karma
Buffer messages even on websocket
- Dominant language
- JavaScript
- Stars
- 12k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
When using polling, Karma [buffers the messages](https://github.com/karma-runner/karma/blob/449b0f5686dffcf4bde2c47b56ef17bd49c1c58c/client/karma.js#L228-L232) (test results). That is because if tests run too fast, browser starts killing the requests.
The same thing unfortunately happens with websockets. Karma needs to buffer messages even for websockets.
If we just buffer everything, it will work, but users will loose the nice "progress" results (it will show 0, 50, 100, etc.) so maybe we can do something smarter, like a timer to buffer only when it is too fast, or depending on the number of pending messages.
We should also look into socket.io mailing lists and issues, this is more likely a general issue that somebody already solved.
Contributor guide
Assessment
This issue has not been assessed yet.