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

test: fix test-domain-exit-dispose-again #3990

Conversation

misterdjules
Copy link

test-domain-exit-dispose-again had been written for node v0.10.x, and
was using the fact that callbacks scheduled with process.nextTick
wouldn't run if the domain attached to it was disposed.

This is not longer the case, and as a result the test would not catch
any regression: it would always pass.

This change rewrites that test to check that the current domain is
cleared properly when processing the rest of the timers list if a
timer's callback throws an error. This makes the test fail without the
original fix, and pass with the original fix, as expected.

test-domain-exit-dispose-again had been written for node v0.10.x, and
was using the fact that callbacks scheduled with `process.nextTick`
wouldn't run if the domain attached to it was disposed.

This is not longer the case, and as a result the test would not catch
any regression: it would always pass.

This change rewrites that test to check that the current domain is
cleared properly when processing the rest of the timers list if a
timer's callback throws an error. This makes the test fail without the
original fix, and pass with the original fix, as expected.
@misterdjules misterdjules added domain Issues and PRs related to the domain subsystem. test Issues and PRs related to the tests. lts-watch-v4.x labels Nov 23, 2015
@misterdjules
Copy link
Author

/cc @nodejs/tsc @nodejs/collaborators

This was first found by @Fishrock123 when playing with timers. See the original discussion.

@nodejs/lts I believe this would be valuable to land in v4.x, so that we catch any potential regression from any change to domains/timers in v4.x.

@trevnorris
Copy link
Contributor

LGTM, and +1 on landing on LTS.

@misterdjules
Copy link
Author

@trevnorris Thank you for the review!

CI tests running.

@misterdjules
Copy link
Author

All tests pass, except for tests on pi1-raspbian-wheezy that seem to not even run. I don't think these failures are due to this PR, so I will merge it asap.

misterdjules pushed a commit that referenced this pull request Nov 27, 2015
test-domain-exit-dispose-again had been written for node v0.10.x, and
was using the fact that callbacks scheduled with `process.nextTick`
wouldn't run if the domain attached to it was disposed.

This is not longer the case, and as a result the test would not catch
any regression: it would always pass.

This change rewrites that test to check that the current domain is
cleared properly when processing the rest of the timers list if a
timer's callback throws an error. This makes the test fail without the
original fix, and pass with the original fix, as expected.

PR: #3990
PR-URL: #3990
Reviewed-By: Trevor Norris <[email protected]>
@misterdjules
Copy link
Author

Landed in 1c85849.

@misterdjules misterdjules mentioned this pull request Nov 27, 2015
misterdjules pushed a commit that referenced this pull request Dec 1, 2015
test-domain-exit-dispose-again had been written for node v0.10.x, and
was using the fact that callbacks scheduled with `process.nextTick`
wouldn't run if the domain attached to it was disposed.

This is not longer the case, and as a result the test would not catch
any regression: it would always pass.

This change rewrites that test to check that the current domain is
cleared properly when processing the rest of the timers list if a
timer's callback throws an error. This makes the test fail without the
original fix, and pass with the original fix, as expected.

PR: #3990
PR-URL: #3990
Reviewed-By: Trevor Norris <[email protected]>
misterdjules pushed a commit that referenced this pull request Dec 4, 2015
test-domain-exit-dispose-again had been written for node v0.10.x, and
was using the fact that callbacks scheduled with `process.nextTick`
wouldn't run if the domain attached to it was disposed.

This is not longer the case, and as a result the test would not catch
any regression: it would always pass.

This change rewrites that test to check that the current domain is
cleared properly when processing the rest of the timers list if a
timer's callback throws an error. This makes the test fail without the
original fix, and pass with the original fix, as expected.

PR: #3990
PR-URL: #3990
Reviewed-By: Trevor Norris <[email protected]>
misterdjules pushed a commit that referenced this pull request Dec 5, 2015
test-domain-exit-dispose-again had been written for node v0.10.x, and
was using the fact that callbacks scheduled with `process.nextTick`
wouldn't run if the domain attached to it was disposed.

This is not longer the case, and as a result the test would not catch
any regression: it would always pass.

This change rewrites that test to check that the current domain is
cleared properly when processing the rest of the timers list if a
timer's callback throws an error. This makes the test fail without the
original fix, and pass with the original fix, as expected.

PR: #3990
PR-URL: #3990
Reviewed-By: Trevor Norris <[email protected]>
@jasnell jasnell mentioned this pull request Dec 17, 2015
misterdjules pushed a commit that referenced this pull request Dec 17, 2015
test-domain-exit-dispose-again had been written for node v0.10.x, and
was using the fact that callbacks scheduled with `process.nextTick`
wouldn't run if the domain attached to it was disposed.

This is not longer the case, and as a result the test would not catch
any regression: it would always pass.

This change rewrites that test to check that the current domain is
cleared properly when processing the rest of the timers list if a
timer's callback throws an error. This makes the test fail without the
original fix, and pass with the original fix, as expected.

PR: #3990
PR-URL: #3990
Reviewed-By: Trevor Norris <[email protected]>
misterdjules pushed a commit that referenced this pull request Dec 23, 2015
test-domain-exit-dispose-again had been written for node v0.10.x, and
was using the fact that callbacks scheduled with `process.nextTick`
wouldn't run if the domain attached to it was disposed.

This is not longer the case, and as a result the test would not catch
any regression: it would always pass.

This change rewrites that test to check that the current domain is
cleared properly when processing the rest of the timers list if a
timer's callback throws an error. This makes the test fail without the
original fix, and pass with the original fix, as expected.

PR: #3990
PR-URL: #3990
Reviewed-By: Trevor Norris <[email protected]>
scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
test-domain-exit-dispose-again had been written for node v0.10.x, and
was using the fact that callbacks scheduled with `process.nextTick`
wouldn't run if the domain attached to it was disposed.

This is not longer the case, and as a result the test would not catch
any regression: it would always pass.

This change rewrites that test to check that the current domain is
cleared properly when processing the rest of the timers list if a
timer's callback throws an error. This makes the test fail without the
original fix, and pass with the original fix, as expected.

PR: nodejs#3990
PR-URL: nodejs#3990
Reviewed-By: Trevor Norris <[email protected]>
@misterdjules misterdjules deleted the fix-test-domain-exit-dispose-again branch July 24, 2017 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain Issues and PRs related to the domain subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants