GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: fix flaky raw-socket and form body tests on Windows by mcollina · Pull Request #215 · fastify/fastify-express

Conversation

@mcollina

@mcollina mcollina commented Nov 20, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Two test flakes keep CI red on Windows.

The raw-socket helpers in test/absolute-form-url.test.js and test/url-encoding.test.js sent the request with socket.end(), which half-closes the connection. Node.js aborts a request that is still in flight when the client ends its side, so a response written asynchronously never arrives and the helper fails reading the status line (Cannot read properties of null (reading '1')). The helpers now write the request and let Connection: close end the connection after the response.

Three tests in test/form-data.test.js aborted a request expected to succeed after 100 ms, which the first request on a slow Windows runner can exceed (566 ms on Node.js 20). The timeout only guards against a hang, so it is now 5 s; the test that expects the request to hang keeps its short timeout.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mcollina
test: keep raw test connections open until the response
f528218
The raw-socket helpers sent the request with socket.end(), which
half-closes the connection. Node.js aborts a request still in flight
when the client ends its side, so a response written asynchronously
was lost and the helper failed reading the status line. This happened
on Windows CI, where the end of the stream is seen sooner. Write the
request instead and let Connection: close end the connection.
@mcollina
mcollina force-pushed the test/raw-request-without-half-close branch from 1c9e138 to f528218 Compare November 20, 2026 17:18
@mcollina
test: give requests expected to succeed time to complete
a47decd
Three form body tests aborted their request after 100 ms, which the
first request on a slow Windows CI runner can exceed (566 ms on Node.js
20). The timeout only guards against a hang, so make it 5 s. The test
that expects the request to hang keeps its short timeout.
@mcollina mcollina changed the title test: keep raw test connections open until the response test: fix flaky raw-socket and form body tests on Windows Nov 20, 2026
@mcollina
mcollina merged commit 2fa7bd5 into main Nov 20, 2026
38 of 39 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@mcollina
mcollina deleted the test/raw-request-without-half-close branch November 20, 2026 17:48
@prkomb prkomb mentioned this pull request Nov 22, 2026
fix: return injected payload when express handles the request #212
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@mcollina
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.