-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(file-list): refresh resolves before 'file_list_modified' event #1551
fix(file-list): refresh resolves before 'file_list_modified' event #1551
Conversation
self._emitModified = function (immediate) { | ||
immediate ? emit() : throttledEmit() | ||
} | ||
}()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to hide these so much, you can just put the outside the constructor like this
function emit (self) {...}
function throttledEmit(self) {...}
...
self._emitModified = function (immediate) {
immediate ? emit(self) : throttledEmit(self)
}
Thanks I left some inline comments |
There were the following issues with your Pull Request
Guidelines are available at http://karma-runner.github.io/0.13/dev/git-commit-msg.html This message was auto-generated by https://gitcop.com |
0be73c0
to
ce08f06
Compare
Updated. |
Thanks could you rebase onto the latest master please? |
ce08f06
to
fe195d7
Compare
done |
Thanks |
Damn can't merge anymore cause I merged the other one first. |
change emitModified to emit 'file_list_modified' immediately during refresh() to remove throttle and race condition during subsequent runner executions Closes karma-runner#1550
fe195d7
to
65f1eca
Compare
Rebased |
…es-before-modified-event fix(file-list): refresh resolves before 'file_list_modified' event
Thanks |
file-list - file_list_modified should be emitted before refresh promise resolves
Runner test execution is scheduled after file-list refresh resolves. The web-server gets the file-list from the last file_list_modified event. This was resulting in a race condition where the web server would grab a stale file list.
Closes #1550