Commit d1ba82a
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: #3991
PR-URL: #3991
Reviewed-By: Trevor Norris <trev.norris@gmail.com>1 parent 9abcead commit d1ba82a
1 file changed
+21
-38
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
38 | 29 | | |
39 | | - | |
40 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
41 | 33 | | |
42 | | - | |
| 34 | + | |
43 | 35 | | |
44 | 36 | | |
45 | 37 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | 38 | | |
55 | 39 | | |
56 | 40 | | |
57 | 41 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
63 | 46 | | |
64 | 47 | | |
65 | 48 | | |
66 | 49 | | |
67 | | - | |
68 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
69 | 59 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
0 commit comments