Skip to content

Commit c83c4a1

Browse files
committed
wip: test: make regression test reliable
1 parent a4fd9e5 commit c83c4a1

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

test/parallel/test-child-process-fork-regr-gh-2847.js renamed to test/sequential/test-child-process-fork-regr-gh-2847.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ if (!cluster.isMaster) {
1717
const server = net.createServer(function(s) {
1818
if (common.isWindows) {
1919
s.on('error', function(err) {
20-
// Prevent possible ECONNRESET errors from popping up
2120
if (err.code !== 'ECONNRESET')
2221
throw err;
2322
});
@@ -36,10 +35,8 @@ const server = net.createServer(function(s) {
3635
// Errors can happen if this connection
3736
// is still happening while the server has been closed.
3837
s.on('error', function(err) {
39-
if ((err.code !== 'ECONNRESET') &&
40-
((err.code !== 'ECONNREFUSED'))) {
38+
if (err.code !== 'ECONNREFUSED')
4139
throw err;
42-
}
4340
});
4441
}
4542

@@ -53,14 +50,7 @@ const server = net.createServer(function(s) {
5350
send(function(err) {
5451
assert.ifError(err);
5552
send(function(err) {
56-
// Ignore errors when sending the second handle because the worker
57-
// may already have exited.
58-
if (err) {
59-
if ((err.message !== 'channel closed') &&
60-
(err.code !== 'ECONNREFUSED')) {
61-
throw err;
62-
}
63-
}
53+
assert.ifError(err);
6454
});
6555
});
6656
});

0 commit comments

Comments
 (0)