Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
code: common.mustcall() is added.
  • Loading branch information
PoojaDurgad committed Aug 31, 2020
commit 66b9109bc653004e14f66171a8f0adae2a20d209
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