#55582: test: bypass system proxy in specs that rely on fake hostnames
Requested by John Kleinschmidt · Slack thread
Description of Change
Follow-up to #55409. On an Azure Pipelines Linux agent that routes traffic through an HTTP proxy, the configureHostResolver "affects dns lookup behavior" spec failed every retry: the request to configure-host-resolver.electron-spec.test came back as a 502 Bad Gateway from the proxy (server: Kestrel). With an HTTP proxy, Chromium hands name resolution to the proxy, which can't resolve the .test hostname, so the resolver configured through app.configureHostResolver is never exercised. The test now sends its requests through its own in-memory session configured with mode: 'direct', so the default session is left untouched. The same proxy also broke spec/security-warnings.spec.ts, which serves its pages from localhost2 (mapped to 127.0.0.1 by host-resolver-rules): those requests went to the proxy instead, so 18 of its 20 tests timed out waiting for the warning. That suite now loads every window in a dedicated in-memory partition with a direct connection as well.
Checklist
- I have filled out the PR description
- I have reviewed and verified the changes
- tests are changed or added
Release Notes
Notes: none
https://claude.ai/code/session_01Vf2yMuskMgmVbr4wqwUBKN
Generated by Claude Code
Backports
Semver Impact
Semantic Versioning helps users understand the impact of updates:
- Major (X.y.z): Breaking changes that may require code modifications
- Minor (x.Y.z): New features that maintain backward compatibility
- Patch (x.y.Z): Bug fixes that don't change the API
- None: Changes that don't affect using facing parts of Electron