test: fix flaky parallel/test-http2-client-upload · nodejs/node@0b45b42 · GitHub
Skip to content

Commit 0b45b42

Browse files
addaleaxgibfahn
authored andcommitted
test: fix flaky parallel/test-http2-client-upload
In parallel/test-http2-client-upload, the `client.destroy()` call could terminate the connection before all data was sent over the wire successfully. Using `client.shutdown()` removes the flakiness. Also, listen on `req.on('finish')` rather than the file stream’s `end` event, since we’re not interested in when the source stream finishes, but rather when the HTTP/2 stream finishes. PR-URL: #17361 Refs: #17356 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Kyle Farnung <kfarnung@microsoft.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Jon Moss <me@jonathanmoss.me>
1 parent e722ddd commit 0b45b42

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/parallel/test-http2-client-upload.js

Lines changed: 2 additions & 2 deletions

0 commit comments

Comments
 (0)