test: fix test-domain-exit-dispose-again#3991
Closed
misterdjules wants to merge 1 commit intonodejs:v0.12-stagingfrom
Closed
test: fix test-domain-exit-dispose-again#3991misterdjules wants to merge 1 commit intonodejs:v0.12-stagingfrom
misterdjules wants to merge 1 commit intonodejs:v0.12-stagingfrom
Conversation
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.
Author
|
This is a back port of #3990 from master to v0.12-staging. /cc @nodejs/tsc @nodejs/collaborators This was first found by @Fishrock123 when playing with timers. See the original discussion. |
Contributor
|
LGTM |
Author
|
@trevnorris Thank you for the review! CI tests running. |
Author
|
All tests pass, except for some tests on Windows (VS 2015 on Windows 10, VS 2013 on Windows 2008 and VS 2015 on Windows 2012) that are not related to the changes in 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: #3991 PR-URL: #3991 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Author
|
Landed in 53ef1a7. |
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: #3991 PR-URL: #3991 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
MylesBorins
pushed a commit
that referenced
this pull request
Feb 11, 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: #3991 PR-URL: #3991 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
jBarz
pushed a commit
to ibmruntimes/node
that referenced
this pull request
Nov 4, 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#3991 PR-URL: nodejs/node#3991 Reviewed-By: Trevor Norris <trev.norris@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
test-domain-exit-dispose-again had been written for node v0.10.x, and
was using the fact that callbacks scheduled with
process.nextTickwouldn'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.