fix(server): don't wait for socket.io store expiration timeout #1040
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is kind of "question PR" (sorry, myself I hate those types of PRs but still too new to Karma internals to be able to say if this is the best approach or not...).
So, the story is the following one: socket.io has a timeout to clean data in a store, ex:
https://github.com/LearnBoost/socket.io/blob/0.9/lib/stores/memory.js#L137
Unfortunately this timeout prevents Karma's node process from existing properly when the test run is finished. The quickest fix is to default this timeout to 0. While it fixes my immediate problem, I'm not sure what are the consequences to Karma of doing so. I'm not sure if Karma is associating any data with a socket in the way that would make usage of socket.io store - in this case defaulting this timeout to 0 could have some side effect.
So, once again, fishing for feedback here more than expecting it to be merged immediately.