-
Notifications
You must be signed in to change notification settings - Fork 30.8k
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
test: fix http-agent-destroyed-socket cb not firing #20006
test: fix http-agent-destroyed-socket cb not firing #20006
Conversation
A whole part of the test-http-agent-destroyed-socket test was not running as the semantics of http events changed slightly and were no longer triggering the expected event. Instead listen to the same event on the socket to verify that the code being tested is still working as expected.
// socket manually at just the right time, but at Voxer we have | ||
// seen cases where the socket is destroyed by non-user code | ||
// then handed out again by an agent *before* the 'close' event | ||
// is triggered. |
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 comment is no longer relevant hence the removal.
Ping @nodejs/http @nodejs/http2 @nodejs/streams |
@@ -47,21 +47,9 @@ const server = http.createServer(common.mustCall((req, res) => { | |||
request1.socket.on('close', common.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 guess this is redundant now.
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.
Ah, good point. Will fix in the morning. Thanks!
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.
LGTM
Landed in 15e136d. |
A whole part of the test-http-agent-destroyed-socket test was not running as the semantics of http events changed slightly and were no longer triggering the expected event. Instead listen to the same event on the socket to verify that the code being tested is still working as expected. PR-URL: #20006 Fixes: #8613 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
A whole part of the test-http-agent-destroyed-socket test was not running as the semantics of http events changed slightly and were no longer triggering the expected event. Instead listen to the same event on the socket to verify that the code being tested is still working as expected. PR-URL: #20006 Fixes: #8613 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
A whole part of the test-http-agent-destroyed-socket test was not running as the semantics of http events changed slightly and were no longer triggering the expected event. Instead listen to the same event on the socket to verify that the code being tested is still working as expected.
Fixes: #8613
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes