jkleinsc

#55652: test: disable retries in api-web-contents spec and split custom page sizes test

Merged
Created: Nov 6, 2026, 10:53:40 AM
Merged: Nov 8, 2026, 11:03:49 PM
4 comments
Target: main

Description of Change

Fixes #55390.

webContents module > printToPDF() > with custom page sizes printed eleven PDFs and parsed all of them with pdf.js inside a single test. On slow win-x64, win-arm64 and mac-x64 hosts that sometimes ran past the 30s per-test timeout and only passed on vitest's in-suite retry.

  • Split it into one test per page size, each doing a single load, printToPDF and parse (same ±0.01in tolerance). Locally each takes about 0.4s, or 1.5–2s for the first one, which loads pdf.js.
  • Set { retry: 0 } on the top-level webContents module suite, and drop the destroy() suite's own retry: 3 (added in 2020 for an unexplained Windows flake), so the whole file runs without retries.

Checklist

  • PR description included
  • npm test passes (for the changed spec file locally)

🤖 Generated with Claude Code

Notes: none

Backports

44-x-y
Merged
PR Number
#55670
Merged At
Nov 9, 2026, 12:20:20 AM
Released In
Not yet
Release Date
Not yet
45-x-y
Merged
PR Number
#55671
Merged At
Nov 9, 2026, 12:14:13 AM
Released In
Not yet
Release Date
Not yet
46-x-y
In-flight
PR Number
#55669
Waiting to be merged

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

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