Skip to content

Commit

Permalink
test: fix timeout not being cleared
Browse files Browse the repository at this point in the history
PR-URL: #54242
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
  • Loading branch information
Isaac-yz-Liu authored and targos committed Oct 2, 2024
1 parent e446517 commit 4c219b0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/parallel/test-pipe-file-to-http.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,10 @@ const filename = tmpdir.resolve('big');
let count = 0;

const server = http.createServer((req, res) => {
let timeoutId;
assert.strictEqual(req.method, 'POST');
req.pause();

setTimeout(() => {
const timeoutId = setTimeout(() => {
req.resume();
}, 1000);

Expand Down

0 comments on commit 4c219b0

Please sign in to comment.