Skip to content

Commit a756b92

Browse files
PoojaDurgadrichardlau
authored andcommitted
test: use mustCall() in test-http-timeout
PR-URL: #34996 Reviewed-By: Juan José Arboleda <[email protected]> Reviewed-By: Tobias Nießen <[email protected]>
1 parent 9011c87 commit a756b92

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/parallel/test-http-timeout.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

2222
'use strict';
23-
require('../common');
23+
const common = require('../common');
2424

2525
const http = require('http');
2626
const Countdown = require('../common/countdown');
27+
const MAX_COUNT = 11;
2728

28-
const server = http.createServer(function(req, res) {
29+
const server = http.createServer(common.mustCall(function(req, res) {
2930
res.writeHead(200, { 'Content-Type': 'text/plain' });
3031
res.end('OK');
31-
});
32+
}, MAX_COUNT));
3233

33-
const MAX_COUNT = 11;
3434
const agent = new http.Agent({ maxSockets: 1 });
3535
const countdown = new Countdown(MAX_COUNT, () => server.close());
3636

0 commit comments

Comments
 (0)