Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harden stream processing close test #4263

Merged
merged 1 commit into from
Jun 23, 2021

Conversation

kanongil
Copy link
Contributor

I fixed the test to be compatible with node 16, which allows the req to be closed while the connection itself is still active.

I also revised the stream, so we can really validate that the processing is stopped.

This is in response to #4262 (comment).

Copy link
Member

@devinivy devinivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That feels much better.

One thing I want to gut-check with you: do you believe that this test simulated bad/unexpected behavior from node's http server, and in turn it's not something critical to cover in node v14 and below? I see that this test has existed since the very early days of the framework, so perhaps it was more important when node was less stable/mature.

@kanongil
Copy link
Contributor Author

As I see it, the test validates that streams stop being processed when a request stops due to downstream / internal issues. My patch updates it so that it better does this with v16 (emitting close on req can no longer be used for this).

Seem legit, but might be tested by some other case. Removing it does not change coverage.

@devinivy devinivy added the test Test or coverage label Jun 23, 2021
@devinivy devinivy merged commit be3e3a2 into hapijs:master Jun 23, 2021
@kanongil kanongil deleted the stream-processing-test branch October 4, 2021 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Test or coverage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants