test: every server start waits a minute, not twenty seconds (#1720) #1721

Merged
jaylouisw merged 1 commit from fix/1116-2005 into main 2026-11-16 20:20:59 +00:00
Owner

Fixes #1720.

The 20:05 UTC run of f4e22080 at PF_TEST_CONCURRENCY=10 came back 10227 assertions passed, 1 failed, and the failure was a crash, not an assertion:

test crashed: Error: server did not answer: connect ECONNREFUSED 127.0.0.1:16131 |
    at test/board-id-is-a-name.test.js:83:50

The | is the child captured output and it is empty, so the restarted server had not reached listen inside the 20 s it was given. Same file, same run, next attempt: 26.8 s and 65/65.

Changed

  • 20 s -> 60 s in the 20 remaining server-start waits (#1715 fixed the 13 that had already failed), each carrying the measurement rather than a bare number.
  • test/server-start-deadline.test.js — no Date.now() + <literal> under a minute anywhere in test/, checked against the two real lines (20000 flagged, 60000 not) so the lint cannot quietly stop recognising its own shape.
  • board-id-is-a-name — startServer split into spawn + waitReady(port, deadline), and #1715 assertion added: a port with nothing behind it fails at the deadline it was given (400 ms), which is the part that was never exercised.

Gates: npm test at 10-way — 288 suites / 10300 assertions / 0 failed (was 287 / 10227 / 1). scripts/syntax-check.js 359 files OK.

Fixes #1720. The 20:05 UTC run of `f4e22080` at `PF_TEST_CONCURRENCY=10` came back **10227 assertions passed, 1 failed**, and the failure was a crash, not an assertion: ``` test crashed: Error: server did not answer: connect ECONNREFUSED 127.0.0.1:16131 | at test/board-id-is-a-name.test.js:83:50 ``` The `|` is the child captured output and it is empty, so the restarted server had not reached `listen` inside the 20 s it was given. Same file, same run, next attempt: 26.8 s and 65/65. **Changed** - 20 s -> 60 s in the 20 remaining server-start waits (#1715 fixed the 13 that had already failed), each carrying the measurement rather than a bare number. - `test/server-start-deadline.test.js` — no `Date.now() + <literal>` under a minute anywhere in `test/`, checked against the two real lines (20000 flagged, 60000 not) so the lint cannot quietly stop recognising its own shape. - `board-id-is-a-name` — `startServer` split into spawn + `waitReady(port, deadline)`, and #1715 assertion added: a port with nothing behind it fails at *the deadline it was given* (400 ms), which is the part that was never exercised. **Gates:** `npm test` at 10-way — 288 suites / **10300 assertions / 0 failed** (was 287 / 10227 / 1). `scripts/syntax-check.js` 359 files OK.
test: every server start waits a minute, not twenty seconds (#1720)
All checks were successful
CI / Classify the change (pull_request) Successful in 17s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 19s
CI / Server smoke test (pull_request) Successful in 18s
CI / Test (Node 20) (pull_request) Successful in 54s
CI / Test (Node 18) (pull_request) Successful in 1m1s
CI / Docker build (pull_request) Successful in 29s
CI / Test (Node 22) (pull_request) Successful in 57s
086f542e26
The 20:05 run of f4e22080 at PF_TEST_CONCURRENCY=10 came back 10227
assertions passed, 1 failed, and the failure was a crash rather than an
assertion: board-id-is-a-name gave its restart 20 s and the second server
had not reached listen inside them (captured output empty).

Twenty files still carried that number. #1714 measured the class and #1715
set the bound to 60 s in the thirteen suites that had already failed; the
rest kept a cap sized for one server on an idle machine.

- 20 s -> 60 s in the 20 remaining start waits, each with the measurement.
- test/server-start-deadline.test.js: no `Date.now() + <literal>` under a
  minute anywhere in test/, so the next new suite cannot pick 20 s again,
  and it is checked against the two real lines (20000 flagged, 60000 not).
- board-id-is-a-name: startServer split into spawn + waitReady(port,
  deadline), plus #1715's assertion that a port with nothing behind it
  fails at the deadline it was given (400 ms), so the bound is exercised.

288 suites / 10300 assertions / 0 failed at 10-way.
jaylouisw scheduled this pull request to auto merge when all checks succeed 2026-11-16 20:20:48 +00:00
jaylouisw scheduled this pull request to auto merge when all checks succeed 2026-11-16 20:20:57 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge!1721
No description provided.