mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
test: fix timeout not being cleared
PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
9e6c526f6c
commit
30f6c56e03
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user