Skip to content

Commit

Permalink
test: use mustCall() in test-http-timeout
Browse files Browse the repository at this point in the history
PR-URL: nodejs#34996
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
  • Loading branch information
PoojaDurgad authored and joesepi committed Oct 22, 2020
1 parent 9af8c74 commit ed84481
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/parallel/test-http-timeout.js
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down

0 comments on commit ed84481

Please sign in to comment.