Browse Source

test: cleanup cluster-disconnect-unshared-tcp test

Replaced var with const

PR-URL: https://github.com/nodejs/node/pull/8598
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ilkka Myller <ilkka.myller@nodefield.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
v6.x
Rachel 8 years ago
committed by Jeremiah Senkpiel
parent
commit
6fb8ebd98c
  1. 8
      test/parallel/test-cluster-disconnect-unshared-tcp.js

8
test/parallel/test-cluster-disconnect-unshared-tcp.js

@ -2,11 +2,11 @@
require('../common');
process.env.NODE_CLUSTER_SCHED_POLICY = 'none';
var cluster = require('cluster');
var net = require('net');
const cluster = require('cluster');
const net = require('net');
if (cluster.isMaster) {
var unbound = cluster.fork().on('online', bind);
const unbound = cluster.fork().on('online', bind);
function bind() {
cluster.fork({BOUND: 'y'}).on('listening', disconnect);
@ -18,7 +18,7 @@ if (cluster.isMaster) {
}
} else {
if (process.env.BOUND === 'y') {
var source = net.createServer();
const source = net.createServer();
source.listen(0);
}

Loading…
Cancel
Save