-
Notifications
You must be signed in to change notification settings - Fork 19
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 appveyor build #24
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e4ad06f
use process.kill instead of spawning linux kill
jedwards1211 359492f
add appveyor.yml
jedwards1211 d544d90
Merge branch 'process-kill' into appveyor-process-kill
jedwards1211 6306866
use SIGKILL
jedwards1211 7e68f80
Merge branch 'process-kill' into appveyor-process-kill
jedwards1211 98e1732
update [email protected]
jedwards1211 042ade1
make sure child processes stay alive for one minute
jedwards1211 0fe368c
make sure to kill parent pid too
jedwards1211 9f8817c
Merge branch 'process-kill' into appveyor-process-kill
jedwards1211 72d1ca9
give windows more time to actually kill the processes
jedwards1211 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Test against this version of Node.js | ||
environment: | ||
matrix: | ||
- nodejs_version: "4" | ||
- nodejs_version: "5" | ||
- nodejs_version: "6" | ||
|
||
platform: | ||
- x86 | ||
- x64 | ||
|
||
# Install scripts. (runs after repo cloning) | ||
install: | ||
# Get the latest stable version of Node.js or io.js | ||
- ps: Install-Product node $env:nodejs_version $env:platform | ||
# install modules | ||
- npm install | ||
|
||
# Post-install test scripts. | ||
test_script: | ||
# Output useful info for debugging. | ||
- node --version | ||
- npm --version | ||
# run tests | ||
- npm run coverage | ||
|
||
# Don't actually build. | ||
build: off | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// does nothing child process | ||
console.log("Child process.id: "+process.pid); | ||
console.log(" - - - - - - - - - - - - - - - - - - - - - - - "); | ||
// keep process alive for one minute | ||
setTimeout(function () {}, 60000); | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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.
@jedwards1211 please clarify why this timeout is required and why it has to be for 60 sec. thanks!
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.
Maybe it's not necessary, I got confused because the windows tests are still very timing-dependent, but I was surprised the tests were ever working because the child processes will exit once they finish those two
console.log
s. UsingsetTimeout
keeps the process alive. The timeout definitely doesn't have to be for one minute though. It could just be a bit longer than the duration of the tests.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.
As far as the timing of windows tests, I guess the best thing is to make the first test poll until all the child processes are gone, with a test timeout of 5 seconds or so (sometimes it takes more than 1 second for the child processes to go away).
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.
agree. poll. 👍
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.
do you want to go ahead and merge this, or do you want me to implement polling?
Polling does have one drawback, I realized. It's unlikely but possible that a new process starts with the same pid as one that was killed, causing terminate to poll forever.
I have implemented polling in my crater-util package (ironically I ended up using that instead of this) and it works well enough for my integration tests though.
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.
Ok. let's merge it and publish a new version. if we get a bug report we can go from there. 👍