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: remove magic numbers in test-gc-http-client-onerror #24943

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
5 participants
@Trott
Copy link
Member

Trott commented Dec 10, 2018

Remove magic numbers 500 and 10 from the test. Instead, detect when GC
has started and stop sending requests at that point.

On my laptop, this results in 68 or 72 requests per run instead of 500.

Fixes: #23089

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
@Trott

This comment has been minimized.

@Trott

This comment has been minimized.

Copy link
Member

Trott commented Dec 10, 2018

Stress test on master (with -J --repeat 100) to hopefully reproduce failures: https://ci.nodejs.org/job/node-stress-single-test/2125/

Stress test on this PR with same parameters:
https://ci.nodejs.org/job/node-stress-single-test/2127/

@bnoordhuis

This comment has been minimized.

Copy link
Member

bnoordhuis commented Dec 10, 2018

Relevant failure: https://ci.nodejs.org/job/node-test-commit-linux/23914/nodes=centos6-64-gcc6/console

If I had to guess, it's because of the removal of the early return in getall().

@Trott

This comment has been minimized.

Copy link
Member

Trott commented Dec 10, 2018

Relevant failure:

Yeah, there's a few of those. Not sure how to re-implement an early return without restoring some kind of magic number but I'll think about it....

@BridgeAR

This comment has been minimized.

Copy link
Member

BridgeAR commented Dec 12, 2018

@Trott it should be sufficient to add another variable (e.g., stop) which is set to true when the server ends. In that case getAll should stop being called.

@Trott Trott force-pushed the Trott:fix-23089 branch 2 times, most recently from 502e7a7 to aeb2138 Dec 13, 2018

@Trott

This comment has been minimized.

@Trott Trott force-pushed the Trott:fix-23089 branch 2 times, most recently from 92b8899 to 011027a Dec 13, 2018

@Trott

This comment has been minimized.

@Trott Trott force-pushed the Trott:fix-23089 branch from 011027a to d37125e Dec 13, 2018

@Trott

This comment has been minimized.

test: remove magic numbers in test-gc-http-client-onerror
Remove magic numbers (500, 10, 100) from the test. Instead, detect when GC
has started and stop sending requests at that point.

On my laptop, this results in 16 or 20 requests per run instead of 500.

Fixes: #23089

@Trott Trott force-pushed the Trott:fix-23089 branch from d37125e to 7974779 Dec 13, 2018

@Trott

This comment has been minimized.

Copy link
Member

Trott commented Dec 13, 2018

@Trott

This comment has been minimized.

Copy link
Member

Trott commented Dec 14, 2018

Worked out the puzzle. This works now. Could use some reviews!

@Trott

This comment has been minimized.

Copy link
Member

Trott commented Dec 15, 2018

Needs a review or two. /ping @nodejs/testing

@Trott

This comment has been minimized.

Copy link
Member

Trott commented Dec 16, 2018

Bump.

@Trott Trott added the author ready label Dec 16, 2018

@Trott

This comment has been minimized.

Copy link
Member

Trott commented Dec 17, 2018

Landed in 47ecf20

@Trott Trott closed this Dec 17, 2018

Trott added a commit to Trott/io.js that referenced this pull request Dec 17, 2018

test: remove magic numbers in test-gc-http-client-onerror
Remove magic numbers (500, 10, 100) from the test. Instead, detect when
GC has started and stop sending requests at that point.

On my laptop, this results in 16 or 20 requests per run instead of 500.

Fixes: nodejs#23089

PR-URL: nodejs#24943
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

MylesBorins added a commit that referenced this pull request Dec 25, 2018

test: remove magic numbers in test-gc-http-client-onerror
Remove magic numbers (500, 10, 100) from the test. Instead, detect when
GC has started and stop sending requests at that point.

On my laptop, this results in 16 or 20 requests per run instead of 500.

Fixes: #23089

PR-URL: #24943
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

MylesBorins added a commit that referenced this pull request Dec 25, 2018

test: remove magic numbers in test-gc-http-client-onerror
Remove magic numbers (500, 10, 100) from the test. Instead, detect when
GC has started and stop sending requests at that point.

On my laptop, this results in 16 or 20 requests per run instead of 500.

Fixes: #23089

PR-URL: #24943
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

@MylesBorins MylesBorins referenced this pull request Dec 25, 2018

Merged

v10.15.0 proposal #25176

MylesBorins added a commit that referenced this pull request Dec 25, 2018

test: remove magic numbers in test-gc-http-client-onerror
Remove magic numbers (500, 10, 100) from the test. Instead, detect when
GC has started and stop sending requests at that point.

On my laptop, this results in 16 or 20 requests per run instead of 500.

Fixes: #23089

PR-URL: #24943
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

@MylesBorins MylesBorins referenced this pull request Dec 25, 2018

Merged

v11.6.0 proposal #25175

refack added a commit to refack/node that referenced this pull request Jan 14, 2019

test: remove magic numbers in test-gc-http-client-onerror
Remove magic numbers (500, 10, 100) from the test. Instead, detect when
GC has started and stop sending requests at that point.

On my laptop, this results in 16 or 20 requests per run instead of 500.

Fixes: nodejs#23089

PR-URL: nodejs#24943
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment