Unverified Commit 6fc8765e authored by Anna Henningsen's avatar Anna Henningsen
Browse files

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: https://github.com/nodejs/node/pull/17361
Refs: https://github.com/nodejs/node/pull/17356


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarKyle Farnung <kfarnung@microsoft.com>
Reviewed-By: default avatarRefael Ackermann <refack@gmail.com>
Reviewed-By: default avatarAnatoli Papirovski <apapirovski@mac.com>
Reviewed-By: default avatarJon Moss <me@jonathanmoss.me>
parent 1c1ef3c3
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment