Skip to content
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 10 commits into from
Oct 29, 2016
Merged

Conversation

jedwards1211
Copy link
Contributor

fix #9
Note: depends on #20 and #23

@codecov-io
Copy link

codecov-io commented Oct 27, 2016

Current coverage is 100% (diff: 100%)

Merging #24 into master will not change coverage

@@           master   #24   diff @@
===================================
  Files           1     1          
  Lines          10    13     +3   
  Methods         0     0          
  Messages        0     0          
  Branches        0     0          
===================================
+ Hits           10    13     +3   
  Misses          0     0          
  Partials        0     0          

Powered by Codecov. Last update 8af86a9...72d1ca9

@@ -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);
Copy link
Member

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!

Copy link
Contributor Author

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.logs. Using setTimeout 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.

Copy link
Contributor Author

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).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree. poll. 👍

Copy link
Contributor Author

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.

Copy link
Member

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. 👍

@nelsonic nelsonic merged commit 38a2311 into dwyl:master Oct 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows 7 killing not working
3 participants