Browse Source

test: remove test-cluster-* var redeclarations

PR-URL: https://github.com/nodejs/node/pull/4980
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
v4.x
Rich Trott 9 years ago
committed by Myles Borins
parent
commit
51204b8e53
  1. 6
      test/parallel/test-cluster-bind-twice.js
  2. 1
      test/parallel/test-cluster-dgram-2.js
  3. 4
      test/parallel/test-cluster-eaddrinuse.js

6
test/parallel/test-cluster-bind-twice.js

@ -51,7 +51,7 @@ if (!id) {
b.send('START');
});
var ok = false;
let ok = false;
b.on('message', function(m) {
if (typeof m === 'object') return; // ignore system messages
@ -68,7 +68,7 @@ if (!id) {
else if (id === 'one') {
if (cluster.isMaster) return startWorker();
var server = http.createServer(common.fail).listen(common.PORT, function() {
http.createServer(common.fail).listen(common.PORT, function() {
process.send('READY');
});
@ -79,7 +79,7 @@ else if (id === 'one') {
else if (id === 'two') {
if (cluster.isMaster) return startWorker();
var ok = false;
let ok = false;
process.on('exit', function() {
assert(ok);
});

1
test/parallel/test-cluster-dgram-2.js

@ -20,7 +20,6 @@ else
function master() {
var i;
var received = 0;
// Start listening on a socket.

4
test/parallel/test-cluster-eaddrinuse.js

@ -11,7 +11,7 @@ var net = require('net');
var id = '' + process.argv[2];
if (id === 'undefined') {
var server = net.createServer(common.fail);
const server = net.createServer(common.fail);
server.listen(common.PORT, function() {
var worker = fork(__filename, ['worker']);
worker.on('message', function(msg) {
@ -23,7 +23,7 @@ if (id === 'undefined') {
});
}
else if (id === 'worker') {
var server = net.createServer(common.fail);
let server = net.createServer(common.fail);
server.listen(common.PORT, common.fail);
server.on('error', common.mustCall(function(e) {
assert(e.code, 'EADDRINUSE');

Loading…
Cancel
Save