| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
why?
Sorry, something went wrong.
There was a problem hiding this comment.
The test used to test that exceptions thrown from setTimeout were in the domain, now they test that test thrown from setImmediate are still in the domain! I don't think you are looking at what the test is doing.
Sorry, something went wrong.
There was a problem hiding this comment.
I understand your point. Since it does not specify a duration (the second argument), I think it's more appropriate to change this call to setImmediate() instead of setTimeout().
Sorry, something went wrong.
There was a problem hiding this comment.
For this test, instead of changing the setTimeout() to setImmediate(), it is better to keep setTimeout() but add a duration of 1. @sam-github is right. This is testing a timer, not an immediate. Changing it to an immediate changes the test. In other words, the setTimeout() is not an incidental tool used within the test. It is part of what is actually being tested.
(In @amazingandyyy's defense, I'm the one that suggested changing setTimeout() with no duration to setImmediate() in the first place. But yeah, that's not right in this test.)
Sorry, something went wrong.
There was a problem hiding this comment.
ditto. the point of the test isn't to run these functions, its to test interactions with timeouts and domains
Sorry, something went wrong.
There was a problem hiding this comment.
same here, it does not specify a duration (the second argument), setImmediate is more appropriate.
Sorry, something went wrong.
There was a problem hiding this comment.
@sam-github is (as usual) right on this one too. We're testing that domains and setTimeout() interact the way they are supposed to, so it needs to be setTimeout(). Add a duration of 1 rather than changing it to setImmediate().
Sorry, something went wrong.
There was a problem hiding this comment.
This looks to me like a combination of random code churn, and unintended changes to the function of the tests.
Sorry, something went wrong.
|
I don't think the changes to test-domain-timers.js belong here. Can we please limit the scope of this PR to just test-domain-uncaught-exception.js? |
Sorry, something went wrong.
There was a problem hiding this comment.
Same here: Use setTimeout() with a duration of 1 instead of setImmediate().
Sorry, something went wrong.
|
Commits need to be squashed |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Squashing commits can also be done by whoever lands the PR, btw.
Sorry, something went wrong.
|
@addaleax, it can, but last time I did that @mhdawson suggested I ask the PR author. Rebasing is part of the work flow, so knowing how to do that helps get people up to speed with node work habits. On the other hand, doing it for them makes it easier. I don't care. @amazingandyyy do you want to squash, or do you want me to? |
Sorry, something went wrong.
|
@sam-github Right, but squashing and rebasing can be tricky depending on somebody’s git experience level, so I like to mention that it’s optional. |
Sorry, something went wrong.
|
@sam-github @addaleax I just do "git rebase -i HEAD~6" and then replace "pick" by "squash" then save the file. I am not sure if this works? I still see 6 commits on this PR. I appreciate this practicing chance. btw, Please feel free to squash it(if my rebasing doesn't work) when landing, thanks! |
Sorry, something went wrong.
|
@amarzavery the last step is to comment all the msg except one (the one that you are going to use as a commit msg) |
Sorry, something went wrong.
|
@amazingandyyy That sounds about right, except you’ll need to keep the first commit as pick |
Sorry, something went wrong.
file: test/parallel/test-domain-uncaught-exception.js 1. There are three setTimeout() in the file and they do not specify a duration (the second argument), so I change them to setImmediate() instead. 2. There are four callbacks that take an argument called `err` but that argument is never used, so I removed them.
|
Thank you! @italoacasas and @addaleax I leave one as pick and clean commit message, then got amazingandyyy ~/projects/node $ git rebase -i HEAD~6 [detached HEAD 8d0badb] minor update to test/parallel/test-domain-uncaught-exception.js Date: Fri Dec 9 00:03:13 2016 -0800 1 file changed, 7 insertions(+), 7 deletions(-) Successfully rebased and updated refs/heads/master. but I still see 6 commits on this PR, do I miss any step or what's next step to complete(make the squashing work?) Thanks |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
Sorry, something went wrong.
|
@amazingandyyy just noticed that the commit message does not fit our contributor guidelines. I'll fix up as part of landing but can you review the guidelines for the next time. The commit message should start with a prefix. In this case 'test:' and the length needs to be less than or equal to 50 chars. See https://github.com/nodejs/node/blob/master/CONTRIBUTING.md#step-3-commit |
Sorry, something went wrong.
|
CI failure on arm was #10073, so not related to this change so CI is good. Will land. |
Sorry, something went wrong.
|
@amazingandyyy one more thing for the next time as well. We need your full name in the commit. I've amended while landed but fore the next time can you make sure its set to: Andy Chen <amazingandyyy@gmail.com> |
Sorry, something went wrong.
file: test/parallel/test-domain-uncaught-exception.js 1. There are three setTimeout() in the file and they do not specify a duration (the second argument), so I change them to setImmediate() instead. 2. There are four callbacks that take an argument called `err` but that argument is never used, so I removed them. PR-URL: #10193 Reviewed-By: Sam Roberts <sam@strongloop.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
|
@mharsch thank you! I will follow contributor guidelines and add my full name next time! Thank you for posting reference! |
Sorry, something went wrong.
We do not need anyone's name for commits. It is up to them. |
Sorry, something went wrong.
|
(Always good to ask first-time contributors, though, of course! People forget to set the name all the time. So, it's a nice gesture to make sure they are making a conscious choice in the matter. I'm just reacting to the "need your full name" phrasing. If someone wants to be "Pat" or "avatar-46", that's their choice.) |
Sorry, something went wrong.
file: test/parallel/test-domain-uncaught-exception.js 1. There are three setTimeout() in the file and they do not specify a duration (the second argument), so I change them to setImmediate() instead. 2. There are four callbacks that take an argument called `err` but that argument is never used, so I removed them. PR-URL: #10193 Reviewed-By: Sam Roberts <sam@strongloop.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
file: test/parallel/test-domain-uncaught-exception.js 1. There are three setTimeout() in the file and they do not specify a duration (the second argument), so I change them to setImmediate() instead. 2. There are four callbacks that take an argument called `err` but that argument is never used, so I removed them. PR-URL: #10193 Reviewed-By: Sam Roberts <sam@strongloop.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
file: test/parallel/test-domain-uncaught-exception.js 1. There are three setTimeout() in the file and they do not specify a duration (the second argument), so I change them to setImmediate() instead. 2. There are four callbacks that take an argument called `err` but that argument is never used, so I removed them. PR-URL: #10193 Reviewed-By: Sam Roberts <sam@strongloop.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
file: test/parallel/test-domain-uncaught-exception.js 1. There are three setTimeout() in the file and they do not specify a duration (the second argument), so I change them to setImmediate() instead. 2. There are four callbacks that take an argument called `err` but that argument is never used, so I removed them. PR-URL: #10193 Reviewed-By: Sam Roberts <sam@strongloop.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
file: test/parallel/test-domain-uncaught-exception.js 1. There are three setTimeout() in the file and they do not specify a duration (the second argument), so I change them to setImmediate() instead. 2. There are four callbacks that take an argument called `err` but that argument is never used, so I removed them. PR-URL: #10193 Reviewed-By: Sam Roberts <sam@strongloop.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
file: test/parallel/test-domain-uncaught-exception.js 1. There are three setTimeout() in the file and they do not specify a duration (the second argument), so I change them to setImmediate() instead. 2. There are four callbacks that take an argument called `err` but that argument is never used, so I removed them. PR-URL: #10193 Reviewed-By: Sam Roberts <sam@strongloop.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
file: test/parallel/test-domain-uncaught-exception.js 1. There are three setTimeout() in the file and they do not specify a duration (the second argument), so I change them to setImmediate() instead. 2. There are four callbacks that take an argument called `err` but that argument is never used, so I removed them. PR-URL: #10193 Reviewed-By: Sam Roberts <sam@strongloop.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
| Back | FazBrowse Home | New Git URL |
file: test/parallel/test-domain-uncaught-exception.js
There are three setTimeout() in the file and they do not specify a
duration (the second argument), so I change them to setImmediate()
instead.
There are four callbacks that take an argument called err but that
argument is never used, I just removed them.