-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
test,http: fix http dump test #19823
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
Conversation
lib/_http_server.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was noted in the original PR. req._consuming is never set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think on Windows it's ECONNABORTED, and it might also be EPIPE as per #19139 (comment). Should we just ignore the error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we still check that _dump() removes all data listeners?
Line 299 in 354849e
| this.removeAllListeners('data'); |
maybe adding an assertion for listenerCount('data') in the 'resume' handler?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a few more comments. All nits that can be ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: This can be safely removed as the listener is wrapped in mustCall().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: I'd wrap the listener with mustCall().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: this could also be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: would you be so kind and punctuate each sentence and also use a capital letter for the first character of a sentence? :-) That applies to all comments in here. The reason is that it is hard to see the beginning and the end of each sentence right now.
c93afee to
010c26c
Compare
|
(I imagine this also fixes the |
010c26c to
37ae792
Compare
|
CI after rebase: https://ci.nodejs.org/job/node-test-pull-request/14112/ |
Do we? I don't think this is still flaky after this rewrite. |
|
I don’t think #19819 was needed. |
37ae792 to
8e245ea
Compare
|
Landed as 1f29963 |
It was needed. I landed this PR on top of master locally on my machine and ran the test under system load and it was still failing. |
|
Here's the demo that this alone wasn't enough to fix the test for parallel runs: |
Fix test-http-dump-req-when-res-ends and move it back to test/parallel/ Refs: nodejs#19823
|
@Trott on my Macbook: So, something weirder was at play here, but I think @lpinca is on to something in #19866. |
|
@mcollina Try a bigger |
Make sure the dump test actually verify what is happening and it is not flaky. See: nodejs#19139 PR-URL: nodejs#19823 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Fixes: #19139
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes