-
Notifications
You must be signed in to change notification settings - Fork 29.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: harden test-gc-http-client #22373
Conversation
1ed6fde
to
c561609
Compare
My local test:
|
stress test: https://ci.nodejs.org/job/node-stress-single-test/1993/ ✔️ |
The stress test came out green. |
test/parallel/test-gc-http-client.js
Outdated
let done = 0; | ||
let count = 0; | ||
let countGC = 0; | ||
|
||
console.log(`We should do ${todo} requests`); | ||
|
||
const server = http.createServer(serverHandler); | ||
server.listen(0, getall); | ||
|
||
server.listen(0, () => { |
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 you wrap this in 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.
We have lots of tests that make sure that server.listen
triggers the callback. If that would not hold, hundreds of tests would fail but if you think strongly about it, I'm going to add it.
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.
@BridgeAR I don't feel strongly about it :)
I wrapped the listen call in a mustCall now. New CI https://ci.nodejs.org/job/node-test-pull-request/16567/ |
Resumed build https://ci.nodejs.org/job/node-test-pull-request/16572/ |
@BridgeAR This needs to be rebased against master to bypass an unfortunate quirk of CI that's affecting some PRs. |
This reduces the total number of requests from 500 to 300 and triggers more requests in parallel. It also moves some function creation out and waits with the first request until the server is listening. Fixes: nodejs#22336
b968c26
to
262fc9f
Compare
CI is green |
Landed in 79642ae, thanks! |
This reduces the total number of requests from 500 to 300 and triggers more requests in parallel. It also moves some function creation out and waits with the first request until the server is listening. PR-URL: #22373 Fixes: #22336 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This reduces the total number of requests from 500 to 300 and triggers more requests in parallel. It also moves some function creation out and waits with the first request until the server is listening. PR-URL: #22373 Fixes: #22336 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This reduces the total number of requests from 500 to 300 and triggers more requests in parallel. It also moves some function creation out and waits with the first request until the server is listening. PR-URL: #22373 Fixes: #22336 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This reduces the total number of requests from 500 to 300 and triggers
more requests in parallel. It also moves some function creation out
and waits with the first request until the server is listening.
Fixes: #22336
@nodejs/testing PTAL
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes