Repository navigation
Description
Test
test-http-server-request-timeouts-mixed
Platform
macos
Console output
not ok 1173 parallel/test-http-server-request-timeouts-mixed
---
duration_ms: 3.244
severity: fail
exitcode: 1
stack: |-
node:assert:399
throw err;
^
AssertionError [ERR_ASSERTION]: The expression evaluated to a falsy value:
assert(request2.completed)
at Timeout._onTimeout (/Users/iojs/build/workspace/node-test-commit-osx/nodes/osx11-x64/test/parallel/test-http-server-request-timeouts-mixed.js:106:5)
at listOnTimeout (node:internal/timers:564:17)
at process.processTimers (node:internal/timers:507:7) {
generatedMessage: true,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '=='
}
Node.js v19.0.0-pre
...Build links
Failed PR
10 (nodejs/node#43329, nodejs/node#43380, nodejs/node#43366, nodejs/node#43455, nodejs/node#43190, nodejs/node#43176, nodejs/node#43374, nodejs/node#43363, nodejs/node#43417, nodejs/node#43216)
Appeared
test-orka-macos11-x64-1, test-nearform-macos10.15-x64-3, test-orka-macos10.15-x64-2, test-nearform-macos10.15-x64-1, test-orka-macos11-x64-2
First CI
Last CI
Example
Additional information
Build links info is from CI Reliability 2022-06-18
This test was introduced on 2022-05-03: #42893
This test starts flaky from 2022-05-04: nodejs/reliability#271
Query all flaky dates: https://github.com/nodejs/reliability/issues?q=is%3Aissue+is%3Aopen+test-http-server-request-timeouts-mixed
cc @ShogunPanda(Test author) @lpinca(Reviewer, I saw you mention the flaky possibility in pr comment)
Activity
lpinca commentedon Jun 18, 2022
It seems this only occurs on macOS but I am not able to reproduce locally on macOS 12.4.
mcollina commentedon Jun 18, 2022
@ShogunPanda could d you take a look?
ShogunPanda commentedon Jun 18, 2022
Yup, I will take a look on Monday!
F3n67u commentedon Jun 18, 2022
Yes, I also tried to reproduce on my local MacOS 12.4 but never reproduced.
test: mark test-http-server-request-timeouts-mixed flaky on macOS
test: mark test-http-server-request-timeouts-mixed flaky on macOS
test: mark test-http-server-request-timeouts-mixed flaky on macOS
nicksia-vgw commentedon Aug 5, 2022
I was able to repro on Mac 12.4:
Let me know if there's anything I can do to help, even if it's just being a lab rat :)
ShogunPanda commentedon Aug 5, 2022
Thanks sir! Do you mind sharing which machine (hardware I mean) were you running on and all the relevant environment information (like if you were on battery or if your machine was overloaded and so forth)
nicksia-vgw commentedon Aug 5, 2022
Sure thing - here's a screenshot of my system details:

My machine was plugged into the wall.
Test was running in CLion's integrated terminal.
I'd say "low-medium" utilisation, had Postgres running in a Docker image and a IDE/Browser open (about 20% CPU usage and 20GB memory used).
Update: Fails even with
request2isolated.nicksia-vgw commentedon Aug 5, 2022
Here's some awfully crude dumps (sorry!), printing out the value of
request2.completedevery 100ms with setInterval.Failed Run:
Passing Run
My passing runs are close to 2500ms after client is created, when the
headersTimeout * 1.2 + connectionsCheckingIntervalon my platform is 2900ms.Could it be that the check is just too early on slow/burdened systems?
Update: I'm getting a bunch of runs around the 3000ms mark when I remove
assert(request2.completed):nicksia-vgw commentedon Aug 8, 2022
The times don't quite match up, which is causing this issue.
headersTimeout: 2000msrequestTimeout: 4000msconnectionsCheckingInterval: 500msRequest 2 is started at
headersTimeout * 0.2, or400ms.Headers time out 2000ms after that.
Completion of Request 2 is checked at at
headersTimeout * 1.2 + connectionsCheckingInterval, or2900ms.Timeline
@[400ms]: Request 2 client created and first write sent.
@[2400ms]: Headers are timed out.
@[2900ms]: Request 2 completion is checked (which is intended to depend on Request 2 expiring via headersTimeout, as seen in the comment -
assert(request2.response.startsWith(responseTimeout)); // It is expired due to headersTimeout.The problem is that the connectionsCheckingInterval is slightly too high. The connection checking interval could tick just after 2400ms, and then just after 2900ms.
Example
The fix is to ensure connection checking interval is less than 500ms, and to decouple the check timeout from connection checking interval.
I'll put up a fix for this shortly.
32 remaining items
test: mark test-http-server-request-timeouts-mixed as flaky
test: mark test-http-server-request-timeouts-mixed as flaky
test: mark test-http-server-request-timeouts-mixed as flaky
test: mark test-http-server-request-timeouts-mixed as flaky
test: mark test-http-server-request-timeouts-mixed as flaky
github-actions commentedon Jun 25, 2026
This issue has been marked as stale due to 210 days of inactivity.
It will be automatically closed in 30 days if no further activity occurs. If this is still relevant, please leave a comment or update it to keep it open.
github-actions commentedon Jul 26, 2026
This issue has been automatically closed after 30 days of inactivity following its stale status (no activity for a total of 120 days).
If this is still relevant, feel free to reopen it or leave a comment with additional details so we can continue the discussion.
test: deflake http server mixed request timeouts
test: deflake http server mixed request timeouts
test: deflake http server mixed request timeouts
test: deflake http server mixed request timeouts
test: deflake http server mixed request timeouts
test: deflake http server mixed request timeouts