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: #34996
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
  • Loading branch information
PoojaDurgad authored and addaleax committed Sep 22, 2020
1 parent cd4b2aa commit 627e484
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 627e484

Please sign in to comment.