From a756b92c4a464eaa975405087ebf46a9b52ed0bf Mon Sep 17 00:00:00 2001 From: "Pooja D.P" Date: Tue, 25 Aug 2020 07:00:31 +0000 Subject: [PATCH] test: use mustCall() in test-http-timeout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/34996 Reviewed-By: Juan José Arboleda Reviewed-By: Tobias Nießen --- test/parallel/test-http-timeout.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-http-timeout.js b/test/parallel/test-http-timeout.js index c576f1c5429101..c3f0e542d2c537 100644 --- a/test/parallel/test-http-timeout.js +++ b/test/parallel/test-http-timeout.js @@ -20,17 +20,17 @@ // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; -require('../common'); +const common = require('../common'); const http = require('http'); const Countdown = require('../common/countdown'); +const MAX_COUNT = 11; -const server = http.createServer(function(req, res) { +const server = http.createServer(common.mustCall(function(req, res) { res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end('OK'); -}); +}, MAX_COUNT)); -const MAX_COUNT = 11; const agent = new http.Agent({ maxSockets: 1 }); const countdown = new Countdown(MAX_COUNT, () => server.close());