Sitelet https://web.archive.org/web/20220319211523/https://github.com/nodejs/node/commit/627e484e62
Skip to content
Permalink
Browse files
test: use mustCall() in test-http-timeout
PR-URL: #34996
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
  • Loading branch information
PoojaDurgad authored and addaleax committed Sep 22, 2020
1 parent cd4b2aa commit 627e484e621444da0ce0a2990626328850ec65af
Showing with 4 additions and 4 deletions.
  1. +4 −4 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());

0 comments on commit 627e484

Please sign in to comment.