Skip to content

Commit

Permalink
http: fixed failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
ShogunPanda committed Jul 1, 2022
1 parent 736a7d8 commit 766c2e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/parallel/test-stream-finished.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ testClosed((opts) => new Writable({ write() {}, ...opts }));

{
const server = http.createServer(common.mustCall((req, res) => {
res.writeHead(200, { 'Connection': 'close' });
res.on('close', common.mustCall(() => {
finished(res, common.mustCall(() => {
server.close();
Expand All @@ -578,6 +579,7 @@ testClosed((opts) => new Writable({ write() {}, ...opts }));

{
const server = http.createServer(common.mustCall((req, res) => {
res.writeHead(200, { 'Connection': 'close' });
req.on('close', common.mustCall(() => {
finished(req, common.mustCall(() => {
server.close();
Expand Down Expand Up @@ -651,6 +653,7 @@ testClosed((opts) => new Writable({ write() {}, ...opts }));

{
const server = http.createServer(common.mustCall(function(req, res) {
res.writeHead(200, { 'Connection': 'close' });
fs.createReadStream(__filename).pipe(res);
finished(res, common.mustCall(function(err) {
assert.strictEqual(err, undefined);
Expand Down

0 comments on commit 766c2e5

Please sign in to comment.