Skip to content

Commit 9d89b3c

Browse files
vsemozhetbytrvagg
authored andcommitted
test: rename some allegories
PR-URL: #22307 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
1 parent 1d15f33 commit 9d89b3c

8 files changed

+29
-29
lines changed

test/internet/test-dgram-broadcast-multi-process.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ if (process.argv[2] !== 'child') {
7070
TIMEOUT);
7171
console.error('[PARENT] Fail');
7272

73-
killChildren(workers);
73+
killSubprocesses(workers);
7474

7575
process.exit(1);
7676
}, TIMEOUT);
@@ -102,7 +102,7 @@ if (process.argv[2] !== 'child') {
102102
console.error('[PARENT] All workers have died.');
103103
console.error('[PARENT] Fail');
104104

105-
killChildren(workers);
105+
killSubprocesses(workers);
106106

107107
process.exit(1);
108108
}
@@ -155,7 +155,7 @@ if (process.argv[2] !== 'child') {
155155

156156
clearTimeout(timer);
157157
console.error('[PARENT] Success');
158-
killChildren(workers);
158+
killSubprocesses(workers);
159159
}
160160
}
161161
});
@@ -203,10 +203,10 @@ if (process.argv[2] !== 'child') {
203203
);
204204
};
205205

206-
function killChildren(children) {
207-
Object.keys(children).forEach(function(key) {
208-
const child = children[key];
209-
child.kill();
206+
function killSubprocesses(subprocesses) {
207+
Object.keys(subprocesses).forEach(function(key) {
208+
const subprocess = subprocesses[key];
209+
subprocess.kill();
210210
});
211211
}
212212
}

test/internet/test-dgram-multicast-multi-process.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,16 @@ function launchChildProcess() {
116116

117117
clearTimeout(timer);
118118
console.error('[PARENT] Success');
119-
killChildren(workers);
119+
killSubprocesses(workers);
120120
}
121121
}
122122
});
123123
}
124124

125-
function killChildren(children) {
126-
Object.keys(children).forEach(function(key) {
127-
const child = children[key];
128-
child.kill();
125+
function killSubprocesses(subprocesses) {
126+
Object.keys(subprocesses).forEach(function(key) {
127+
const subprocess = subprocesses[key];
128+
subprocess.kill();
129129
});
130130
}
131131

@@ -141,7 +141,7 @@ if (process.argv[2] !== 'child') {
141141
TIMEOUT);
142142
console.error('[PARENT] Fail');
143143

144-
killChildren(workers);
144+
killSubprocesses(workers);
145145

146146
process.exit(1);
147147
}, TIMEOUT);

test/internet/test-dgram-multicast-set-interface-lo.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ if (process.argv[2] !== 'child') {
8989
TIMEOUT);
9090
console.error('[PARENT] Skip');
9191

92-
killChildren(workers);
92+
killSubprocesses(workers);
9393
common.skip('Check filter policy');
9494

9595
process.exit(1);
@@ -132,7 +132,7 @@ if (process.argv[2] !== 'child') {
132132
console.error('[PARENT] All workers have died.');
133133
console.error('[PARENT] Fail');
134134

135-
killChildren(workers);
135+
killSubprocesses(workers);
136136

137137
process.exit(1);
138138
}
@@ -187,7 +187,7 @@ if (process.argv[2] !== 'child') {
187187

188188
clearTimeout(timer);
189189
console.error('[PARENT] Success');
190-
killChildren(workers);
190+
killSubprocesses(workers);
191191
}
192192
}
193193
});
@@ -239,9 +239,9 @@ if (process.argv[2] !== 'child') {
239239
);
240240
};
241241

242-
function killChildren(children) {
243-
for (const i in children)
244-
children[i].kill();
242+
function killSubprocesses(subprocesses) {
243+
for (const i in subprocesses)
244+
subprocesses[i].kill();
245245
}
246246
}
247247

test/parallel/test-child-process-fork-net.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ if (process.argv[2] === 'child') {
122122
while (j--) {
123123
const client = net.connect(this.address().port, '127.0.0.1');
124124
client.on('error', function() {
125-
// This can happen if we kill the child too early.
125+
// This can happen if we kill the subprocess too early.
126126
// The client should still get a close event afterwards.
127127
console.error('[m] CLIENT: error event');
128128
});

test/parallel/test-listen-fd-detached-inherit.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function test() {
5353
function next() {
5454
console.error('output from parent = %s', json);
5555
const child = JSON.parse(json);
56-
// now make sure that we can request to the child, then kill it.
56+
// now make sure that we can request to the subprocess, then kill it.
5757
http.get({
5858
server: 'localhost',
5959
port: child.port,
@@ -64,7 +64,7 @@ function test() {
6464
s += c.toString();
6565
});
6666
res.on('end', function() {
67-
// kill the child before we start doing asserts.
67+
// kill the subprocess before we start doing asserts.
6868
// it's really annoying when tests leave orphans!
6969
process.kill(child.pid, 'SIGKILL');
7070
try {

test/parallel/test-listen-fd-detached.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function test() {
5353
function next() {
5454
console.error('output from parent = %s', json);
5555
const child = JSON.parse(json);
56-
// now make sure that we can request to the child, then kill it.
56+
// now make sure that we can request to the subprocess, then kill it.
5757
http.get({
5858
server: 'localhost',
5959
port: child.port,
@@ -64,7 +64,7 @@ function test() {
6464
s += c.toString();
6565
});
6666
res.on('end', function() {
67-
// kill the child before we start doing asserts.
67+
// kill the subprocess before we start doing asserts.
6868
// it's really annoying when tests leave orphans!
6969
process.kill(child.pid, 'SIGKILL');
7070
try {

test/parallel/test-listen-fd-server.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ process.on('exit', function() {
4444
// concurrency in HTTP servers! Use the cluster module, or if you want
4545
// a more low-level approach, use child process IPC manually.
4646
test(function(child, port) {
47-
// now make sure that we can request to the child, then kill it.
47+
// now make sure that we can request to the subprocess, then kill it.
4848
http.get({
4949
server: 'localhost',
5050
port: port,

test/sequential/test-child-process-fork-getconnections.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ if (process.argv[2] === 'child') {
5858
const child = fork(process.argv[1], ['child']);
5959

6060
child.on('exit', function(code, signal) {
61-
if (!childKilled)
62-
throw new Error('child died unexpectedly!');
61+
if (!subprocessKilled)
62+
throw new Error('subprocess died unexpectedly!');
6363
});
6464

6565
const server = net.createServer();
@@ -86,10 +86,10 @@ if (process.argv[2] === 'child') {
8686
}
8787
});
8888

89-
let childKilled = false;
89+
let subprocessKilled = false;
9090
function closeSockets(i) {
9191
if (i === count) {
92-
childKilled = true;
92+
subprocessKilled = true;
9393
server.close();
9494
child.kill();
9595
return;

0 commit comments

Comments
 (0)