Skip to content
Permalink
Browse files

test: remove test-cluster-* var redeclarations

PR-URL: #4980
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information...
Trott authored and rvagg committed Jan 30, 2016
1 parent c3d9329 commit a2881e2187d8b924d09dedf5f091fbacf7323aa7
@@ -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);
});
@@ -20,7 +20,6 @@ else


function master() {
var i;
var received = 0;

// Start listening on a socket.
@@ -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');

0 comments on commit a2881e2

Please sign in to comment.
You can’t perform that action at this time.