Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add mustCall to http-abort-queued test #27447

Closed
wants to merge 1 commit into from
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();
});
}));