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

Fix test-http2-session-timeout.js and move to parallel #24877

Closed
wants to merge 2 commits into from

Conversation

@Trott
Copy link
Member

commented Dec 6, 2018

First commit:

test: make http2 timeout test robust

Instead of using magic values for the server timeout in
test-http2-session-timeout, measure the duration of the first request
(which should be longer than subsequent requests) and use that value.

Fixes: https://github.com/nodejs/node/issues/20628

Second commit:

test: move http2 test to parallel

A fix to test-http2-session-timeout makes it sufficiently robust that it
can be moved to the parallel directory.
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@Trott Trott added the http2 label Dec 6, 2018

@Trott

This comment has been minimized.

Copy link
Member Author

commented Dec 6, 2018

The test now passes under heavy load in parallel:

$ tools/test.py --repeat 192 -j 96 test/parallel/test-http2-session-timeout.js 
[00:18|% 100|+ 192|-   0]: Done 
$ 

On master, moving it to parallel makes it trivial to break with even a relatively small load:

$ tools/test.py --repeat 16 -j 16 test/parallel/test-http2-session-timeout.js 
=== release test-http2-session-timeout ===                   
Path: parallel/test-http2-session-timeout
assert.js:128
  throw err;
  ^

AssertionError [ERR_ASSERTION]: Timeout after 40 request(s)
    at Http2Server.mustNotCall (/Users/trott/io.js/test/parallel/test-http2-session-timeout.js:13:10)
    at Http2Server.emit (events.js:189:13)
    at ServerHttp2Session.sessionOnTimeout (internal/http2/core.js:2622:15)
    at Object.onceWrapper (events.js:277:13)
    at ServerHttp2Session.emit (events.js:189:13)
    at ServerHttp2Session._onTimeout (internal/http2/core.js:1307:10)
    at listOnTimeout (timers.js:324:15)
    at processTimers (timers.js:268:5)
Command: out/Release/node /Users/trott/io.js/test/parallel/test-http2-session-timeout.js
=== release test-http2-session-timeout ===                   
Path: parallel/test-http2-session-timeout
assert.js:128
  throw err;
  ^

AssertionError [ERR_ASSERTION]: Timeout after 130 request(s)
    at Http2Server.mustNotCall (/Users/trott/io.js/test/parallel/test-http2-session-timeout.js:13:10)
    at Http2Server.emit (events.js:189:13)
    at ServerHttp2Session.sessionOnTimeout (internal/http2/core.js:2622:15)
    at Object.onceWrapper (events.js:277:13)
    at ServerHttp2Session.emit (events.js:189:13)
    at ServerHttp2Session._onTimeout (internal/http2/core.js:1307:10)
    at listOnTimeout (timers.js:324:15)
    at processTimers (timers.js:268:5)
Command: out/Release/node /Users/trott/io.js/test/parallel/test-http2-session-timeout.js
[00:01|% 100|+  14|-   2]: Done                              
$

@Trott Trott force-pushed the Trott:fix-20628 branch from d6b837a to af57c73 Dec 6, 2018

Trott added 2 commits Dec 6, 2018
test: make http2 timeout test robust
Instead of using magic values for the server timeout in
test-http2-session-timeout, measure the duration of the first request
(which should be longer than subsequent requests) and use that value.

Fixes: #20628
test: move http2 test to parallel
A fix to test-http2-session-timeout makes it sufficiently robust that it
can be moved to the parallel directory.

@Trott Trott force-pushed the Trott:fix-20628 branch from af57c73 to 9c93c03 Dec 6, 2018

@Trott

This comment has been minimized.

Copy link
Member Author

commented Dec 6, 2018

@lpinca
lpinca approved these changes Dec 6, 2018
@mcollina
Copy link
Member

left a comment

LGTM, brilliant technique!

@Trott

This comment has been minimized.

Copy link
Member Author

commented Dec 7, 2018

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

@cjihrig
cjihrig approved these changes Dec 8, 2018
@trivikr
trivikr approved these changes Dec 8, 2018
@Trott

This comment has been minimized.

Copy link
Member Author

commented Dec 8, 2018

Landed in 008b904...9df18ad

@Trott Trott closed this Dec 8, 2018

Trott added a commit to Trott/io.js that referenced this pull request Dec 8, 2018
test: make http2 timeout test robust
Instead of using magic values for the server timeout in
test-http2-session-timeout, measure the duration of the first request
(which should be longer than subsequent requests) and use that value.

Fixes: nodejs#20628

PR-URL: nodejs#24877
Fixes: nodejs#20628
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Trott added a commit to Trott/io.js that referenced this pull request Dec 8, 2018
test: move http2 test to parallel
A fix to test-http2-session-timeout makes it sufficiently robust that it
can be moved to the parallel directory.

PR-URL: nodejs#24877
Fixes: nodejs#20628
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
BethGriggs added a commit that referenced this pull request Dec 17, 2018
test: make http2 timeout test robust
Instead of using magic values for the server timeout in
test-http2-session-timeout, measure the duration of the first request
(which should be longer than subsequent requests) and use that value.

Fixes: #20628

PR-URL: #24877
Fixes: #20628
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
BethGriggs added a commit that referenced this pull request Dec 17, 2018
test: move http2 test to parallel
A fix to test-http2-session-timeout makes it sufficiently robust that it
can be moved to the parallel directory.

PR-URL: #24877
Fixes: #20628
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
@BethGriggs BethGriggs referenced this pull request Dec 18, 2018
refack added a commit to refack/node that referenced this pull request Jan 14, 2019
test: make http2 timeout test robust
Instead of using magic values for the server timeout in
test-http2-session-timeout, measure the duration of the first request
(which should be longer than subsequent requests) and use that value.

Fixes: nodejs#20628

PR-URL: nodejs#24877
Fixes: nodejs#20628
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
refack added a commit to refack/node that referenced this pull request Jan 14, 2019
test: move http2 test to parallel
A fix to test-http2-session-timeout makes it sufficiently robust that it
can be moved to the parallel directory.

PR-URL: nodejs#24877
Fixes: nodejs#20628
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
BethGriggs added a commit that referenced this pull request Feb 12, 2019
test: make http2 timeout test robust
Instead of using magic values for the server timeout in
test-http2-session-timeout, measure the duration of the first request
(which should be longer than subsequent requests) and use that value.

Fixes: #20628

PR-URL: #24877
Fixes: #20628
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
BethGriggs added a commit that referenced this pull request Feb 12, 2019
test: move http2 test to parallel
A fix to test-http2-session-timeout makes it sufficiently robust that it
can be moved to the parallel directory.

PR-URL: #24877
Fixes: #20628
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
@BethGriggs BethGriggs referenced this pull request Feb 12, 2019
BethGriggs added a commit that referenced this pull request Feb 20, 2019
test: make http2 timeout test robust
Instead of using magic values for the server timeout in
test-http2-session-timeout, measure the duration of the first request
(which should be longer than subsequent requests) and use that value.

Fixes: #20628

PR-URL: #24877
Fixes: #20628
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
BethGriggs added a commit that referenced this pull request Feb 20, 2019
test: move http2 test to parallel
A fix to test-http2-session-timeout makes it sufficiently robust that it
can be moved to the parallel directory.

PR-URL: #24877
Fixes: #20628
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
rvagg added a commit that referenced this pull request Feb 28, 2019
test: make http2 timeout test robust
Instead of using magic values for the server timeout in
test-http2-session-timeout, measure the duration of the first request
(which should be longer than subsequent requests) and use that value.

Fixes: #20628

PR-URL: #24877
Fixes: #20628
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
rvagg added a commit that referenced this pull request Feb 28, 2019
test: move http2 test to parallel
A fix to test-http2-session-timeout makes it sufficiently robust that it
can be moved to the parallel directory.

PR-URL: #24877
Fixes: #20628
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants
You can’t perform that action at this time.