Commit 0ee4df9
test: make listen-fd-cluster/server more robust
- eliminate unnecessary intermediate process ("parent")
- children exit if runner dies unexpectedly (killed on a test timeout,
for example)
- use explicit messaging from children to parents to indicate when
worker is ready to accept http requests, rather than racing to see
whether runner will make request before worker is listening
PR-URL: #1944
Reviewed-By: Johan Bergstrom <bugs@bergstroem.nu>
Reviewed-By: Ben Noordhuis <ben@strongloop.com>1 parent 1738c96 commit 0ee4df9Copy full SHA for 0ee4df9
File tree
Expand file treeCollapse file tree
2 files changed
+88
-79
lines changedOpen diff view settings
Filter options
- test/parallel
Expand file treeCollapse file tree
2 files changed
+88
-79
lines changedOpen diff view settings
Collapse file
test/parallel/test-listen-fd-cluster.js
Copy file name to clipboardExpand all lines: test/parallel/test-listen-fd-cluster.js+50-35Lines changed: 50 additions & 35 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
7 | 7 | |
8 | 8 | |
9 | 9 | |
10 | | - |
| 10 | + |
11 | 11 | |
12 | 12 | |
13 | 13 | |
14 | 14 | |
15 | 15 | |
16 | 16 | |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
17 | 22 | |
18 | 23 | |
19 | 24 | |
20 | 25 | |
21 | | - |
22 | 26 | |
23 | 27 | |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
24 | 34 | |
25 | 35 | |
26 | 36 | |
27 | 37 | |
28 | 38 | |
29 | 39 | |
30 | | - |
31 | | - |
32 | | - |
33 | | - |
34 | | - |
35 | | - |
36 | | - |
37 | | - |
38 | | - |
39 | | - |
40 | | - |
41 | | - |
42 | | - |
43 | | - |
44 | | - |
45 | | - |
46 | | - |
47 | | - |
48 | | - |
49 | | - |
50 | | - |
51 | | - |
52 | | - |
53 | | - |
54 | | - |
55 | | - |
56 | | - |
57 | | - |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
58 | 56 | |
59 | 57 | |
60 | 58 | |
| 59 | + |
61 | 60 | |
62 | 61 | |
63 | | - |
64 | | - |
| 62 | + |
| 63 | + |
65 | 64 | |
66 | | - |
| 65 | + |
67 | 66 | |
68 | 67 | |
69 | 68 | |
| ||
73 | 72 | |
74 | 73 | |
75 | 74 | |
76 | | - |
| 75 | + |
77 | 76 | |
78 | 77 | |
79 | 78 | |
| ||
90 | 89 | |
91 | 90 | |
92 | 91 | |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | + |
| 96 | + |
93 | 97 | |
94 | 98 | |
95 | 99 | |
| ||
99 | 103 | |
100 | 104 | |
101 | 105 | |
102 | | - |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | + |
| 115 | + |
| 116 | + |
103 | 117 | |
104 | 118 | |
105 | 119 | |
| ||
112 | 126 | |
113 | 127 | |
114 | 128 | |
| 129 | + |
115 | 130 | |
116 | 131 | |
Collapse file
test/parallel/test-listen-fd-server.js
Copy file name to clipboardExpand all lines: test/parallel/test-listen-fd-server.js+38-44Lines changed: 38 additions & 44 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
13 | 13 | |
14 | 14 | |
15 | 15 | |
16 | | - |
17 | | - |
18 | 16 | |
19 | 17 | |
20 | | - |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
21 | 24 | |
22 | 25 | |
23 | 26 | |
24 | 27 | |
25 | 28 | |
26 | | - |
27 | | - |
28 | | - |
29 | | - |
30 | | - |
31 | | - |
32 | | - |
33 | | - |
34 | | - |
35 | | - |
36 | | - |
37 | | - |
38 | | - |
39 | | - |
40 | | - |
41 | | - |
42 | | - |
43 | | - |
44 | | - |
45 | | - |
46 | | - |
47 | | - |
48 | | - |
49 | | - |
50 | | - |
51 | | - |
52 | | - |
53 | | - |
54 | | - |
55 | | - |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
56 | 43 | |
57 | 44 | |
| 45 | + |
| 46 | + |
58 | 47 | |
59 | 48 | |
60 | | - |
61 | | - |
| 49 | + |
| 50 | + |
62 | 51 | |
63 | 52 | |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
64 | 60 | |
65 | 61 | |
66 | 62 | |
67 | 63 | |
68 | 64 | |
69 | 65 | |
70 | 66 | |
| 67 | + |
71 | 68 | |
72 | 69 | |
73 | 70 | |
74 | | - |
| 71 | + |
75 | 72 | |
76 | 73 | |
77 | 74 | |
| ||
80 | 77 | |
81 | 78 | |
82 | 79 | |
83 | | - |
| 80 | + |
84 | 81 | |
85 | 82 | |
86 | 83 | |
| ||
90 | 87 | |
91 | 88 | |
92 | 89 | |
93 | | - |
94 | | - |
95 | | - |
96 | | - |
97 | | - |
98 | | - |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | + |
99 | 94 | |
100 | | - |
101 | 95 | |
102 | 96 | |
0 commit comments