Skip to content

Commit 1d100f6

Browse files
TrottMyles Borins
authored and
Myles Borins
committed
test: remove unused vars from http/https tests
Remove handful of variables that are assigned but never used. (This was missed by the linter in previous versions of ESLint but is flagged by the current version. Updating the linter is contingent on this change or some similar remedy landing.) PR-URL: #7598 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
1 parent 4b464ce commit 1d100f6

5 files changed

+0
-12
lines changed

test/parallel/test-http-client-timeout-agent.js

-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ var common = require('../common');
33
var assert = require('assert');
44
var http = require('http');
55

6-
var request_number = 0;
76
var requests_sent = 0;
87
var requests_done = 0;
98
var options = {
@@ -24,7 +23,6 @@ var server = http.createServer(function(req, res) {
2423
res.write(reqid.toString());
2524
res.end();
2625
}
27-
request_number += 1;
2826
});
2927

3028
server.listen(options.port, options.host, function() {

test/parallel/test-http-pipeline-flood.js

-2
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@ switch (process.argv[2]) {
2727
function parent() {
2828
const http = require('http');
2929
const bigResponse = new Buffer(10240).fill('x');
30-
var requests = 0;
3130
var connections = 0;
3231
var backloggedReqs = 0;
3332

3433
const server = http.createServer(function(req, res) {
35-
requests++;
3634
res.setHeader('content-length', bigResponse.length);
3735
if (!res.write(bigResponse)) {
3836
if (backloggedReqs === 0) {

test/parallel/test-http-upgrade-agent.js

-3
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ var net = require('net');
1111

1212
// Create a TCP server
1313
var srv = net.createServer(function(c) {
14-
var data = '';
1514
c.on('data', function(d) {
16-
data += d.toString('utf8');
17-
1815
c.write('HTTP/1.1 101\r\n');
1916
c.write('hello: world\r\n');
2017
c.write('connection: upgrade\r\n');

test/parallel/test-http-upgrade-client.js

-3
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ var net = require('net');
1111

1212
// Create a TCP server
1313
var srv = net.createServer(function(c) {
14-
var data = '';
1514
c.on('data', function(d) {
16-
data += d.toString('utf8');
17-
1815
c.write('HTTP/1.1 101\r\n');
1916
c.write('hello: world\r\n');
2017
c.write('connection: upgrade\r\n');

test/parallel/test-https-foafssl.js

-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ var options = {
2424
requestCert: true
2525
};
2626

27-
var reqCount = 0;
2827
var CRLF = '\r\n';
2928
var body = 'hello world\n';
3029
var cert;
@@ -33,7 +32,6 @@ var modulus;
3332
var exponent;
3433

3534
var server = https.createServer(options, function(req, res) {
36-
reqCount++;
3735
console.log('got request');
3836

3937
cert = req.connection.getPeerCertificate();

0 commit comments

Comments
 (0)