Commit d94a70e
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: #3990
Reviewed-By: Trevor Norris <trev.norris@gmail.com>1 parent f3c50f5 commit d94a70eCopy full SHA for d94a70e
File tree
Expand file treeCollapse file tree
1 file changed
+23
-40
lines changedOpen diff view settings
Filter options
- test/parallel
Expand file treeCollapse file tree
1 file changed
+23
-40
lines changedOpen diff view settings
Collapse file
test/parallel/test-domain-exit-dispose-again.js
Copy file name to clipboard+23-40Lines changed: 23 additions & 40 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
1 | 1 | |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
| 2 | + |
| 3 | + |
| 4 | + |
6 | 5 | |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
| 6 | + |
| 7 | + |
| 8 | + |
18 | 9 | |
19 | | - |
| 10 | + |
| 11 | + |
20 | 12 | |
21 | | - |
22 | | - |
| 13 | + |
| 14 | + |
23 | 15 | |
24 | 16 | |
25 | 17 | |
26 | | - |
27 | | - |
28 | | - |
29 | | - |
30 | | - |
31 | | - |
32 | | - |
33 | | - |
34 | 18 | |
35 | 19 | |
36 | 20 | |
37 | 21 | |
38 | | - |
39 | | - |
40 | | - |
41 | | - |
42 | | - |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
43 | 26 | |
44 | 27 | |
45 | 28 | |
46 | 29 | |
47 | | - |
48 | | - |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
49 | 39 | |
50 | | - |
51 | | - |
52 | | - |
53 | | - |
54 | | - |
55 | | - |
56 | | - |
0 commit comments