ckerr

#53938: test: isolate reporting API session

Merged
Created: Sep 14, 2026, 11:00:53 PM
Merged: Sep 15, 2026, 9:54:11 AM
5 comments
Target: main

Description of Change

Found while investigating repeated Windows ARM64 test failures when running tests on a downstream Electron fork: reporting api sends a report for an intervention repeatedly exhausted its 30-second timeout and all automatic retries.

The test uses session.defaultSession, so it inherits reporting state from earlier activity and retries. Chromium sends immediately only when the session's delivery timer is not running, then starts a one-minute delivery interval. A report queued while that timer is active can therefore outlive the test's timeout. This is a test-isolation defect, not a reason to change runtime delivery behavior.

Use a fresh in-memory session for every test invocation, including retries, so delivery is independent of previous reporting activity. Also check the reported URL against the page URL rather than comparing it to itself. No runtime changes, longer timeouts, sleeps, or skips.

Validation:

  • Native differential reproduction on Linux, Electron 46 nightly / Chromium 155: after priming the default session, the exact original test body delivered after 60,002 ms; five executions of the fixed body in the same process delivered in 48-63 ms each.
  • Focused native Mocha spec passed with retries disabled; file-scoped JavaScript lint, pre-commit checks, and whitespace checks passed. The full suite was not run.
  • Windows ARM64 has not been retested. The exact activity that primed reporting state in the downstream runs remains unconfirmed; the shared-session failure mechanism is reproduced locally.

Backport assessment: 45-x-y, 44-x-y, 43-x-y, and 42-x-y all contain the identical unfixed reporting suite and 30-second test timeout. Their pinned Chromium versions (155.0.8038.2, 152.0.7977.78, 150.0.7871.250, and 148.0.7778.280, respectively) all have the same delivery-timer gate and one-minute interval. The patch applies cleanly to all four branches; release-branch runtime testing remains for CI.

CC @mlaurencin

Checklist

Release Notes

Notes: none

Backports

42-x-y
Merged
PR Number
#53953
Merged At
Sep 15, 2026, 11:41:09 AM
Released In
Not yet
Release Date
Not yet
43-x-y
Merged
PR Number
#53952
Merged At
Sep 15, 2026, 11:41:12 AM
Released In
Not yet
Release Date
Not yet
44-x-y
Merged
PR Number
#53955
Merged At
Sep 15, 2026, 11:41:06 AM
Released In
Not yet
Release Date
Not yet
45-x-y
Merged
PR Number
#53954
Merged At
Sep 15, 2026, 11:41:06 AM
Released In
Not yet
Release Date
Not yet

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