Skip to content

Route the last three test servers through the port allocator - #17

Merged
fajarhide merged 1 commit into
mainfrom
fix/all-test-servers-below-ephemeral
Aug 17, 2026
Merged

Route the last three test servers through the port allocator#17
fajarhide merged 1 commit into
mainfrom
fix/all-test-servers-below-ephemeral

Conversation

@fajarhide

Copy link
Copy Markdown
Owner

Follow-up to #16, which was incomplete. It changed startTestServer and stopped there, while three files build their own server and kept binding from the ephemeral range:

test/admin-workspaces.test.ts:22
test/service-auth.test.ts:17
test/health.test.ts:19

All three now go through the same allocator, which is exported for that purpose.

The second guard is the more useful half. It greps the suite for the pattern, so the next server that binds this way fails the test rather than waiting to be noticed:

$ # reintroduce one in health.test.ts
AssertionError: expected [ 'test/health.test.ts' ] to deeply equal []

Full suite: 35 files, 351 tests, green. Typecheck clean.

Closes #14

The first pass at #14 changed startTestServer and left admin-workspaces,
service-auth and health binding on their own, so the collision stayed
reachable from three files. They now share the allocator.

The suite greps itself for the pattern, which is what would have caught the
miss the first time.
@fajarhide
fajarhide merged commit ee1ffd7 into main Aug 17, 2026
2 checks passed
@fajarhide
fajarhide deleted the fix/all-test-servers-below-ephemeral branch August 17, 2026 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tests bind ephemeral ports and sometimes talk to another process on the machine, which answers a bare 405

1 participant