Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.3k
test: use consistent timeouts#42893
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: use consistent timeouts #42893
Uh oh!
There was an error while loading. Please reload this page.
Conversation
ShogunPanda commented Apr 28, 2022 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
CC: @nodejs/http |
nodejs-github-bot commented Apr 28, 2022
nodejs-github-bot commented Apr 28, 2022
| @@ -0,0 +1,133 @@ | |||
| 'use strict' | |||
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.
Relying on timers is the most frequent source of flakiness in tests. Apart from doing it concurrently with multiple requests, does this test tests something not already tested in existing tests?
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.
I know, timers are messy. But unfortunately this test is about testing timers. :(
Yes, it checks that the concurrent checking of requestTimeout and headersTimeout works properly.
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.
My point is, are requestTimeout and headersTimeout already tested with a single request? If so what makes this test special? Why wouldn't the options work with multiple concurrent request if they work with a single one?
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.
Well, they should, but I thought adding a more complex "real world like" scenario would have helped for future regression testing.
Uh oh!
There was an error while loading. Please reload this page.
mcollina left a comment
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.
lgtm
Co-authored-by: Luigi Pinca <[email protected]>
ShogunPanda commented May 3, 2022
@lpinca Are we good on this PR? Can we land it? |
lpinca commented May 3, 2022
I have no objections. |
ShogunPanda commented May 3, 2022
@lpinca Do you mind leaving the second approval so I can proceed? |
nodejs-github-bot commented May 3, 2022
PR-URL: #42893 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Co-authored-by: Luigi Pinca <[email protected]>
ShogunPanda commented May 3, 2022
Landed in c3aa86d |
PR-URL: #42893 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Co-authored-by: Luigi Pinca <[email protected]>
juanarbol commented May 31, 2022
Sadly, a test seems to be break ( test/parallel/test-http-server-request-timeouts-mixed.js) in V16.x: $ ./node test/parallel/test-http-server-request-timeouts-mixed.js node:assert:123 throw new AssertionError(obj); ^ AssertionError [ERR_ASSERTION]: Expected values to be strictly equal: 60000 !== 2000 at Object.<anonymous> (/home/juanarbol/GitHub/node/test/parallel/test-http-server-request-timeouts-mixed.js:34:8) at Module._compile (node:internal/modules/cjs/loader:1105:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) at node:internal/main/run_main_module:17:47{generatedMessage: true, code: 'ERR_ASSERTION', actual: 60000, expected: 2000, operator: 'strictEqual'**}** |
This PR enforces consistent timeouts for HTTP tests.