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());