ckerr

#54734: test: stop a leftover net log before the next netLog test

Merged
Created: Oct 7, 2026, 4:20:52 PM
Merged: Oct 8, 2026, 9:00:27 AM
5 comments
Target: main

Description of Change

In api-net-log.spec.ts, if a test failed while logging, the afterEach hook asserted that logging had stopped.
That assertion failed too, and logging stayed on.
Every later test in the file, and every retry, then failed in beforeEach's "not currently logging" check.

This change makes afterEach stop any log that is still running, before deleting the dump files, and drops the hook's assertion.
Only test code changes.

Validation

Ran on a local Linux testing build of main under Xvfb:

  • e test --files spec/api-net-log.spec.ts: 5 passed.
  • As a control, I made the test throw once on its first attempt and ran it with CI retries (CI=1). On main, all 5 tests in the file failed through all 3 retries. With this change, all 5 passed.
  • script/lint.js --js and tsc -p tsconfig.spec.json pass.

🤖 Generated with Claude Code

Checklist

Release Notes

Notes: none

Backports

42-x-y
Merged
PR Number
#54764
Merged At
Oct 8, 2026, 12:57:14 PM
Released In
Not yet
Release Date
Not yet
43-x-y
Merged
PR Number
#54763
Merged At
Oct 8, 2026, 10:59:52 AM
Released In
Not yet
Release Date
Not yet
44-x-y
Merged
PR Number
#54765
Merged At
Oct 8, 2026, 10:59:49 AM
Released In
Not yet
Release Date
Not yet
45-x-y
Merged
PR Number
#54766
Merged At
Oct 8, 2026, 10:59:47 AM
Released In
v45.0.0-beta.1
Release Date
Oct 8, 2026, 7:07:44 PM

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