-
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
Add possibility to stop a karma server #1854
Add possibility to stop a karma server #1854
Conversation
Thanks for this. I would really like to see an e2e test making sure this works as expected. |
Take a look at the support files for the e2e tests, they are relatively straightforward javascript functions https://github.com/karma-runner/karma/blob/master/test/e2e/steps/core_steps.js#L43 |
Cheers, I'll have a look at this ASAP. On Thu, Feb 4, 2016 at 9:24 PM Friedel Ziegelmayer [email protected]
|
9342a53
to
4c8f6e0
Compare
Now testing:
|
4c8f6e0
to
db79170
Compare
@@ -0,0 +1,42 @@ | |||
Feature: Stop karma | |||
TODO write this |
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.
missing todo ;)
This is pretty sweet, one thing that would be nice is to have the |
Yeah, I can see that! I'll add it. On Wed, Feb 10, 2016 at 9:47 PM Friedel Ziegelmayer <
|
db79170
to
1fe10fc
Compare
@dignifiedquire Here you go. |
|
||
### **stopper.stop(options, [callback=process.exit])** | ||
|
||
This function will signal a running server to stop. Equivalent of `karma stop`. |
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.
Will this work if detached=false
?
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.
The detached
setting is currently only working when running the server from CLI, since it's basically just calling itself in a new detached process.
So yes and no: The stop command will stop the server regardless of the detached
setting and the server will not run detached when starting it programically. If this is a priority I'll certainly look into it.
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.
We are doing sth very similar here: https://github.com/karma-runner/grunt-karma/blob/master/tasks/grunt-karma.js#L114-L134 so it would be nice if we could replace that with this new option, rather than duplication that effort
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.
Cool, I'll look into it during the weekend.
@dignifiedquire I have added the detached feature. In order to do so, I had to write the configuration as a file, hence the |
8b5f5e5
to
3784109
Compare
@budde377 I think the e2e tests are not passing anymore :( |
Add detached mode using the `karma start --detached` command. Add middleware for stopping a server (detached or not). Described the detached option.
Add the `stopper` as a command to the public API allowing for enabling users to programically terminate a running server.
When setting `detached=true` in config, the server will start detached.
Default config to empty Object if undefined.
Add a setup-function for setting up the log-level and colors from config.
3784109
to
d14bd62
Compare
@dignifiedquire, This should do the trick. |
A bit too fast there, I'll take a look at the failing node 0.10. |
Change the timing on tests, allowing Node 0.10 to catch-up.
@dignifiedquire Done |
Thanks @budde377 merging this. Let's hope this time around things go smoother :) |
Add possibility to stop a karma server
This is a fix for issue #136. This:
karma start --detached
command.Any pointers on testing this or describing the new command (
karma stop
)?