Skip to content

Commit

Permalink
test: remove duplicate test
Browse files Browse the repository at this point in the history
`test/parallel/test-http-agent-no-wait.js` is basically a duplicate of
`test/parallel/test-http-client-close-with-default-agent.js`, remove it.

PR-URL: #44051
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Feng Yu <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
  • Loading branch information
lpinca authored and danielleadams committed Aug 11, 2022
1 parent 65887b6 commit f882318
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/parallel/test-http-client-close-with-default-agent.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
'use strict';

const common = require('../common');
const assert = require('assert');
const http = require('http');

const server = http.createServer(function(req, res) {
res.writeHead(200);
res.end();
});

server.listen(0, common.mustCall(() => {
const req = http.get({ port: server.address().port }, (res) => {
assert.strictEqual(res.statusCode, 200);
res.resume();
server.close();
});

req.end();
}));

// This timer should never go off as the server will close the socket
setTimeout(common.mustNotCall(), common.platformTimeout(1000)).unref();

0 comments on commit f882318

Please sign in to comment.