Skip to content

Let the env proxy test's fake proxy answer forwarded requests - #8526

Merged
ymichael merged 1 commit into
get-bb:mainfrom
lanjak:fix-node26-env-proxy-test
Dec 2, 2026
Merged

ymichael merged 1 commit into
get-bb:mainfrom
lanjak:fix-node26-env-proxy-test

Conversation

@lanjak

@lanjak lanjak commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Human comments

What was wrong

With --use-env-proxy, Node 22 and 24 send a plain http:// fetch to the proxy as CONNECT host:80, but Node 26 sends it as a forwarded GET http://... request. The fake proxy in the "managed process networking" tests (#6394) handled only CONNECT. On Node 26 the request got no answer, so both tests timed out.

What changed

packages/bb-app/test/index.test.ts: the fake proxy also answers a forwarded request with proxied. Both handlers record the request target, and the test checks that exactly one request reached the proxy: bb-proxy-test.invalid:80 (CONNECT) or http://bb-proxy-test.invalid/ (forwarded). The test still fails if the child does not use the proxy (the .invalid host cannot resolve) or if loopback goes through the proxy (a second target, and proxied instead of direct). Test-only change.

How you verified

Node main this PR
26.13.1 2 failed (timeout) 2 passed
22.23.5 2 passed 2 passed
24.23.0 2 passed 2 passed

Command: node ../../node_modules/vitest/vitest.mjs run test/index.test.ts -t "environment proxy" in packages/bb-app, with each official nodejs.org build. turbo run typecheck lint lint:type-aware test --filter=bb-app passes on Node 26.13.1. CI tests only Node 22, so CI passes before and after. The first row is the regression check.

Fixes #8525

AGENT GENERATED

With --use-env-proxy, Node 22.23 and 24.23 send a plain http:// fetch
to the proxy as CONNECT host:80, but Node 26.13 sends it as an
absolute-form GET http://... request. The fake proxy in the "managed
process networking" test handled only CONNECT, so on Node 26 the
request had no answer and both tests timed out. The proxy now also
answers a forwarded request, and the test checks that exactly one
request for bb-proxy-test.invalid reached it, in either form.
@ymichael
ymichael merged commit 5566163 into get-bb:main Dec 2, 2026
23 checks passed
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.

bb-app env proxy tests time out on Node 26

2 participants