Skip to content

test: run gitbranch watcher stress test in-memory with synctest - #4616

Merged
dgageot merged 1 commit into
docker:mainfrom
dgageot:worktree-board-a504c524d806290a
Oct 16, 2026
Merged

dgageot merged 1 commit into
docker:mainfrom
dgageot:worktree-board-a504c524d806290a

Conversation

@dgageot

@dgageot dgageot commented Oct 16, 2026

Copy link
Copy Markdown
Member

Why

Windows CI job 116939219866 (run 38890691710) failed because pkg/gitbranch/watcher_test.go's stress test exceeded its 10s wall-clock deadline — the test does 10,000 disk-backed refreshes, which is too slow under Windows CI load.

What

  • Replace the 10,000 disk-backed refreshes with an in-memory Current("") call, run inside testing/synctest.
  • Remove the flaky 10s wall-clock deadline and its timeout recovery logic.
  • Concurrency regression coverage is retained (same goroutine/refresh shape, just without disk I/O or a wall-clock timeout).

No production code is changed — test-only.

Validation

  • task build, task test, task lint
  • 4000 stress executions (-count=1000 -cpu=1,2,4,8)
  • 100 race repetitions for refresh tests
  • Windows amd64 package cross-compilation

Reviewer also reran the whole gitbranch package under -race, and confirmed via mutation testing that reintroducing the original blocking drain triggers a synctest deadlock (i.e. the test still catches the original bug). Native Windows execution was not performed locally.

Drops disk I/O and the 10s timeout fallback in favor of synctest,
removing the flakiness under load.

Assisted-By: docker-agent
@dgageot
dgageot requested a review from a team as a code owner October 16, 2026 11:16
@dgageot
dgageot added this pull request to the merge queue Oct 16, 2026
@aheritier aheritier added area/testing Test infrastructure, CI/CD, test runners, evaluation kind/test Test-only changes labels Oct 16, 2026
Merged via the queue into docker:main with commit 47c3bb4 Oct 16, 2026
16 checks passed
@dgageot
dgageot deleted the worktree-board-a504c524d806290a branch October 16, 2026 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/testing Test infrastructure, CI/CD, test runners, evaluation kind/test Test-only changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants