-
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: improve reliability in http2-session-timeout #22026
Conversation
170374d
to
d328194
Compare
Use `setImmediate()` instead of `setTimeout()` to improve robustness of test-http2-session-timeout. Fixes: nodejs#20628
d328194
to
3ee47c7
Compare
@@ -37,7 +36,7 @@ server.listen(0, common.mustCall(() => { | |||
const diff = process.hrtime(startTime); | |||
const milliseconds = (diff[0] * 1e3 + diff[1] / 1e6); | |||
if (milliseconds < serverTimeout * 2) { | |||
setTimeout(makeReq, callTimeout); | |||
setImmediate(makeReq); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
All I can suggest is making the server timeout 1000 and the callTimeout 200. The current change makes this test no longer valid.
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.
D'oh, I totally misread how this test works. Works for me if this actually fixes the flakiness
@Trott can we confirm with a stress test? From what I recall of writing this test, launching too many requests was problematic in making the test flaky in a different way. I used to have setTimeout for 1ms which was nearly equivalent to this. Edit: just got home and started it myself https://ci.nodejs.org/job/node-stress-single-test/1973/ |
@nodejs/testing |
I ran two stress tests and both appear to be green. 🎉 |
Resume Build: https://ci.nodejs.org/job/node-test-pull-request/16112/ |
Resume build: https://ci.nodejs.org/job/node-test-pull-request/16135/ |
Use `setImmediate()` instead of `setTimeout()` to improve robustness of test-http2-session-timeout. Fixes: nodejs#20628 PR-URL: nodejs#22026 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Landed in d2ffcac |
Use `setImmediate()` instead of `setTimeout()` to improve robustness of test-http2-session-timeout. Fixes: #20628 PR-URL: #22026 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Use `setImmediate()` instead of `setTimeout()` to improve robustness of test-http2-session-timeout. Fixes: nodejs#20628 PR-URL: nodejs#22026 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Use `setImmediate()` instead of `setTimeout()` to improve robustness of test-http2-session-timeout. Fixes: nodejs#20628 PR-URL: nodejs#22026 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Use `setImmediate()` instead of `setTimeout()` to improve robustness of test-http2-session-timeout. Fixes: #20628 Backport-PR-URL: #22850 PR-URL: #22026 Reviewed-By: Anatoli Papirovski <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
Use
setImmediate()
instead ofsetTimeout()
to improve robustness oftest-http2-session-timeout.
Fixes: #20628
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes