8000 test: add mustCall to http-abort-queued test · nodejs/node@f4124d5 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Commit f4124d5

Browse files
tsyeyuanfengtargos
authored andcommitted
test: add mustCall to http-abort-queued test
PR-URL: #27447 Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Weijia Wang <starkwang@126.com> Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
1 parent 9c842f4 commit f4124d5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/parallel/test-http-abort-queued.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const http = require('http');
2626

2727
let complete;
2828

29-
const server = http.createServer((req, res) => {
29+
const server = http.createServer(common.mustCall((req, res) => {
3030
// We should not see the queued /thatotherone request within the server
3131
// as it should be aborted before it is sent.
3232
assert.strictEqual(req.url, '/');
@@ -37,10 +37,9 @@ const server = http.createServer((req, res) => {
3737
complete = complete || function() {
3838
res.end();
3939
};
40-
});
40+
}));
4141

42-
43-
server.listen(0, () => {
42+
server.listen(0, common.mustCall(() => {
4443
const agent = new http.Agent({ maxSockets: 1 });
4544
assert.strictEqual(Object.keys(agent.sockets).length, 0);
4645

@@ -93,4 +92,4 @@ server.listen(0, () => {
9392
});
9493

9594
req1.end();
96-
});
95+
}));

0 commit comments

Comments
 (0)
0