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

test: harden test-gc-http-client #22373

Closed
wants to merge 1 commit into from

Conversation

BridgeAR
Copy link
Member

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), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Aug 17, 2018
@BridgeAR
Copy link
Member Author

My local test:

> python tools/test.py -j 64 --repeat 64 parallel/test-gc-http-client.js
// Before:
[02:02|% 100|+   2|-  62]: Done
// After:                       
[01:24|% 100|+  64|-   0]: Done    

@BridgeAR
Copy link
Member Author

@joyeecheung
Copy link
Member

joyeecheung commented Aug 17, 2018

@BridgeAR
Copy link
Member Author

The stress test came out green.

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, () => {
Copy link
Member

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()?

Copy link
Member Author

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.

Copy link
Member

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 :)

@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Aug 19, 2018
@BridgeAR
Copy link
Member Author

I wrapped the listen call in a mustCall now.

New CI https://ci.nodejs.org/job/node-test-pull-request/16567/

@BridgeAR
Copy link
Member Author

@Trott
Copy link
Member

Trott commented Aug 19, 2018

@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
@BridgeAR
Copy link
Member Author

@joyeecheung
Copy link
Member

CI is green

@joyeecheung
Copy link
Member

Landed in 79642ae, thanks!

joyeecheung pushed a commit that referenced this pull request Aug 20, 2018
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>
targos pushed a commit that referenced this pull request Aug 21, 2018
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>
targos pushed a commit that referenced this pull request Sep 3, 2018
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>
@BridgeAR BridgeAR deleted the harden-gc-test branch January 20, 2020 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate flaky parallel/test-gc-http-client
6 participants