Skip to content
Closed
Changes from all commits
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
9 changes: 4 additions & 5 deletions test/parallel/test-http-abort-queued.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, '/');
Expand All @@ -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);

Expand Down Expand Up @@ -93,4 +92,4 @@ server.listen(0, () => {
});

req1.end();
});
}));