test: fix redeclared vars in sequential tests
PR-URL: https://github.com/nodejs/node/pull/4999 Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
This commit is contained in:
parent
cb51688c36
commit
5ea1e7d55f
@ -38,7 +38,7 @@ var msgBuf = new Buffer(msg + '\n');
|
|||||||
|
|
||||||
cmd = `"${process.execPath}" -e "console.log(\'${msg}\');"`;
|
cmd = `"${process.execPath}" -e "console.log(\'${msg}\');"`;
|
||||||
|
|
||||||
var ret = execSync(cmd);
|
ret = execSync(cmd);
|
||||||
|
|
||||||
assert.strictEqual(ret.length, msgBuf.length);
|
assert.strictEqual(ret.length, msgBuf.length);
|
||||||
assert.deepEqual(ret, msgBuf, 'execSync result buffer should match');
|
assert.deepEqual(ret, msgBuf, 'execSync result buffer should match');
|
||||||
|
@ -35,14 +35,14 @@ var counterBefore = counter;
|
|||||||
|
|
||||||
// Now load the module a bunch of times with equivalent paths.
|
// Now load the module a bunch of times with equivalent paths.
|
||||||
// stat should not be called.
|
// stat should not be called.
|
||||||
for (var i = 0; i < 100; i++) {
|
for (let i = 0; i < 100; i++) {
|
||||||
require(common.fixturesDir + '/a');
|
require(common.fixturesDir + '/a');
|
||||||
require('../fixtures/a.js');
|
require('../fixtures/a.js');
|
||||||
require('./../fixtures/a.js');
|
require('./../fixtures/a.js');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do the same with a built-in module
|
// Do the same with a built-in module
|
||||||
for (var i = 0; i < 100; i++) {
|
for (let i = 0; i < 100; i++) {
|
||||||
require('http');
|
require('http');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,8 +38,8 @@ server.onconnection = function(err, client) {
|
|||||||
|
|
||||||
var req = new WriteWrap();
|
var req = new WriteWrap();
|
||||||
req.async = false;
|
req.async = false;
|
||||||
var err = client.writeBuffer(req, buffer);
|
const returnCode = client.writeBuffer(req, buffer);
|
||||||
assert.equal(err, 0);
|
assert.equal(returnCode, 0);
|
||||||
client.pendingWrites.push(req);
|
client.pendingWrites.push(req);
|
||||||
|
|
||||||
console.log('client.writeQueueSize: ' + client.writeQueueSize);
|
console.log('client.writeQueueSize: ' + client.writeQueueSize);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user