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 <[email protected]>
Reviewed-By: Jake Yuesong Li <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Tierney Cyren <[email protected]>
  • Loading branch information
Isaac-yz-Liu authored Aug 9, 2024
1 parent 9e6c526 commit 30f6c56
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 30f6c56

Please sign in to comment.