test: fix test-domain-exit-dispose-again
authorJulien Gilli <julien.gilli@joyent.com>
Mon, 23 Nov 2015 21:13:40 +0000 (13:13 -0800)
committerJames M Snell <jasnell@gmail.com>
Wed, 23 Dec 2015 16:38:33 +0000 (08:38 -0800)
commit06dcc6d10a40479aea811dbb198e621d381c574f
tree06b0f2ce0a4049231822dd07d630fb26eeffa3c2
parent4008e756edafe97c5206d6ce172d7d24743a1a3c
test: fix test-domain-exit-dispose-again

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: https://github.com/nodejs/node/pull/3990
Reviewed-By: Trevor Norris <trev.norris@gmail.com>
test/parallel/test-domain-exit-dispose-again.js