From 0fbd852578b11006b2c5c127fefcc879ef7b0f80 Mon Sep 17 00:00:00 2001 From: Yaphet Ye Date: Sun, 28 Apr 2019 16:48:48 +0800 Subject: [PATCH] test: add mustCall to http-abort-queued test PR-URL: https://github.com/nodejs/node/pull/27447 Reviewed-By: Gireesh Punathil Reviewed-By: Weijia Wang Reviewed-By: Yorkie Liu Reviewed-By: Yongsheng Zhang Reviewed-By: Colin Ihrig Reviewed-By: Ouyang Yadong --- test/parallel/test-http-abort-queued.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/parallel/test-http-abort-queued.js b/test/parallel/test-http-abort-queued.js index 224d0b606ea744..17950c106c3769 100644 --- a/test/parallel/test-http-abort-queued.js +++ b/test/parallel/test-http-abort-queued.js @@ -26,7 +26,7 @@ const http = require('http'); let complete; -const server = http.createServer((req, res) => { +const server = http.createServer(common.mustCall((req, res) => { // We should not see the queued /thatotherone request within the server // as it should be aborted before it is sent. assert.strictEqual(req.url, '/'); @@ -37,10 +37,9 @@ const server = http.createServer((req, res) => { complete = complete || function() { res.end(); }; -}); +})); - -server.listen(0, () => { +server.listen(0, common.mustCall(() => { const agent = new http.Agent({ maxSockets: 1 }); assert.strictEqual(Object.keys(agent.sockets).length, 0); @@ -93,4 +92,4 @@ server.listen(0, () => { }); req1.end(); -}); +}));