Skip to content

Stop the wiring tests racing the revision list - #644

Merged
hannesa2 merged 1 commit into
masterfrom
fix-wiring-tests-racing-the-revision-list
Sep 15, 2026
Merged

hannesa2 merged 1 commit into
masterfrom
fix-wiring-tests-racing-the-revision-list

Conversation

@goneng

@goneng goneng commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Fixes #643.

The revision list walks the repository on a background queue that outlives the
test body. Every one of these tests deleted its fixture while a walk was still
reading it, so the walk failed and the assertion in -addCommitsFromEnumerator:
landed on whichever test happened to be running.

The overlap was always present, not occasional. Logging isUpdating at
tearDown:

isUpdating when the fixture is deleted
master 1, all six tests, every run
this branch 0, all six tests

That is why the failures looked random and moved between tests, and why they
only showed up when the machine was busy.

Test plan

  • Full suite passes, idle and under load
  • Logged isUpdating at tearDown on both branches, as above

The revision list walks the repository on a background queue that
outlives the test body, so every one of these tests deleted its fixture
while a walk was still reading it. The walk then failed, and the
assertion it raises landed on whichever test happened to be running.

* Let each test start from a settled revision list, rather than
  competing with a walk that is still filling the history
* Cancel the walk and wait for it to stop before the fixture is removed
@goneng
goneng marked this pull request as ready for review September 14, 2026 21:32
@goneng
goneng requested a review from hannesa2 September 14, 2026 21:32
@goneng goneng added the test Test related label Sep 14, 2026
@hannesa2

Copy link
Copy Markdown
Contributor

Screenshot differs: emulatorApi=arm64 with 4 screenshot(s)

setpoint (old) | diff | actual screenshot (new)

00-commit-context-menu.pngscreenshot

01-history-view.pngscreenshot

02-main-window.pngscreenshot

03-staging-view.pngscreenshot

@hannesa2
hannesa2 merged commit 59b967f into master Sep 15, 2026
3 checks passed
@hannesa2
hannesa2 deleted the fix-wiring-tests-racing-the-revision-list branch September 15, 2026 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test Test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PBGitWindowWiringTests fails when the machine is under load

2 participants