From e1aedbf671785bd5d84eabd4a329cba96e86bf9f Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 7 Jul 2016 15:30:50 -0700 Subject: [PATCH] test: remove unused vars from http/https tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: https://github.com/nodejs/node/pull/7598 Reviewed-By: Colin Ihrig Reviewed-By: Michaƫl Zasso --- test/parallel/test-http-client-timeout-agent.js | 2 -- test/parallel/test-http-pipeline-flood.js | 2 -- test/parallel/test-http-upgrade-agent.js | 3 --- test/parallel/test-http-upgrade-client.js | 3 --- test/parallel/test-https-foafssl.js | 2 -- 5 files changed, 12 deletions(-) diff --git a/test/parallel/test-http-client-timeout-agent.js b/test/parallel/test-http-client-timeout-agent.js index 998b69e240c4cd..c479f6ef1c718b 100644 --- a/test/parallel/test-http-client-timeout-agent.js +++ b/test/parallel/test-http-client-timeout-agent.js @@ -3,7 +3,6 @@ require('../common'); var assert = require('assert'); var http = require('http'); -var request_number = 0; var requests_sent = 0; var requests_done = 0; var options = { @@ -24,7 +23,6 @@ var server = http.createServer(function(req, res) { res.write(reqid.toString()); res.end(); } - request_number += 1; }); server.listen(0, options.host, function() { diff --git a/test/parallel/test-http-pipeline-flood.js b/test/parallel/test-http-pipeline-flood.js index c5c8af7a18097d..b42834d2b0e164 100644 --- a/test/parallel/test-http-pipeline-flood.js +++ b/test/parallel/test-http-pipeline-flood.js @@ -27,12 +27,10 @@ switch (process.argv[2]) { function parent() { const http = require('http'); const bigResponse = Buffer.alloc(10240, 'x'); - var requests = 0; var connections = 0; var backloggedReqs = 0; const server = http.createServer(function(req, res) { - requests++; res.setHeader('content-length', bigResponse.length); if (!res.write(bigResponse)) { if (backloggedReqs === 0) { diff --git a/test/parallel/test-http-upgrade-agent.js b/test/parallel/test-http-upgrade-agent.js index 01074d7e7bb7b0..4e88e525b74fb2 100644 --- a/test/parallel/test-http-upgrade-agent.js +++ b/test/parallel/test-http-upgrade-agent.js @@ -11,10 +11,7 @@ var net = require('net'); // Create a TCP server var srv = net.createServer(function(c) { - var data = ''; c.on('data', function(d) { - data += d.toString('utf8'); - c.write('HTTP/1.1 101\r\n'); c.write('hello: world\r\n'); c.write('connection: upgrade\r\n'); diff --git a/test/parallel/test-http-upgrade-client.js b/test/parallel/test-http-upgrade-client.js index 4530819e35cb50..85e9f8f3c2e90c 100644 --- a/test/parallel/test-http-upgrade-client.js +++ b/test/parallel/test-http-upgrade-client.js @@ -11,10 +11,7 @@ var net = require('net'); // Create a TCP server var srv = net.createServer(function(c) { - var data = ''; c.on('data', function(d) { - data += d.toString('utf8'); - c.write('HTTP/1.1 101\r\n'); c.write('hello: world\r\n'); c.write('connection: upgrade\r\n'); diff --git a/test/parallel/test-https-foafssl.js b/test/parallel/test-https-foafssl.js index c846c56cce1b28..f8370e73902242 100644 --- a/test/parallel/test-https-foafssl.js +++ b/test/parallel/test-https-foafssl.js @@ -24,7 +24,6 @@ var options = { requestCert: true }; -var reqCount = 0; var CRLF = '\r\n'; var body = 'hello world\n'; var cert; @@ -33,7 +32,6 @@ var modulus; var exponent; var server = https.createServer(options, function(req, res) { - reqCount++; console.log('got request'); cert = req.connection.getPeerCertificate();