Scope the goroutine-leak assertions to pdbmux's own goroutines #22

Merged
benvin merged 1 commits from benvin/e2e-goroutine-flake into main 2026-09-07 20:02:16 +10:00
Member

The two goroutine-leak assertions count every goroutine in the process, so
under -tags e2e the testcontainers goroutines running alongside them fail
the tests roughly one run in three on changes they have nothing to do with.

  • Count only goroutines whose stack names the flight group, the fan-out or
    the prober, against a baseline sampled the same way
  • Derive those frame names from method expressions, so a rename breaks the
    build rather than silently matching nothing
  • Poll the prober check to the shared deadline instead of sampling it once

Tests only.

The two goroutine-leak assertions count every goroutine in the process, so under `-tags e2e` the testcontainers goroutines running alongside them fail the tests roughly one run in three on changes they have nothing to do with. - Count only goroutines whose stack names the flight group, the fan-out or the prober, against a baseline sampled the same way - Derive those frame names from method expressions, so a rename breaks the build rather than silently matching nothing - Poll the prober check to the shared deadline instead of sampling it once Tests only.
unkin-agent added 1 commit 2026-09-07 18:06:43 +10:00
Count only pdbmux's own goroutines in the leak assertions
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
c6a5e5fcd5
Asserting an absolute runtime.NumGoroutine() fails roughly one run in
three under -tags e2e, where the harness keeps a live server, its prober
and testcontainers goroutines alive alongside these tests.

- Match goroutine stacks naming the flight group, fan-out or prober
- Derive those frame names from method expressions
- Compare against a baseline sampled the same way
- Poll the prober's settle check instead of sampling it once
benvin merged commit 85d134a449 into main 2026-09-07 20:02:16 +10:00
benvin deleted branch benvin/e2e-goroutine-flake 2026-09-07 20:02:16 +10:00
Sign in to join this conversation.