From 23748856d11c9e2df12263414abcd78f22f3c9e0 Mon Sep 17 00:00:00 2001 From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Wed, 28 Oct 2026 01:02:11 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20test(hive):=20stop=20boot-config?= =?UTF-8?q?=20tests=20binding=20the=20real=20pprof=20port?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit TestBootConfigWith_ConfigPathDisagreementAndTracingFailureAreWarnings fails on v5 with 'registered 4 cleanups, want 3' whenever 127.0.0.1:6060 happens to be free on the runner: the fake config leaves debug.pprof_addr empty, so startRuntimeObservability binds the default listener and pushes its stop hook. Disable the listener in the fakes so the cleanup count only reflects lock, cancel and tracing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> --- src/cmd/hive/boot_config_deps_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/cmd/hive/boot_config_deps_test.go b/src/cmd/hive/boot_config_deps_test.go index 55c73ea861..0abb9933bc 100644 --- a/src/cmd/hive/boot_config_deps_test.go +++ b/src/cmd/hive/boot_config_deps_test.go @@ -75,6 +75,11 @@ func newBootConfigFake(t *testing.T) *bootConfigFake { cfg.Project.Org = "acme" cfg.Project.Repos = []string{"acme/widgets"} cfg.Agents = map[string]config.AgentConfig{} + // Never bind the real pprof listener from a unit test: whether + // 127.0.0.1:6060 is free decides whether startRuntimeObservability + // registers an extra cleanup, which made the cleanup-count + // assertions below depend on what else runs on the CI host. + cfg.Debug.PprofAddr = config.PprofAddrOff return cfg, nil }, // Every logger the phase installs is captured, including the stdout @@ -348,6 +353,7 @@ func TestBootConfigWith_ConfigPathDisagreementAndTracingFailureAreWarnings(t *te cfg.Agents = map[string]config.AgentConfig{} cfg.Project.Org = "acme" cfg.Project.Repos = []string{"other/repo"} // not under the org + cfg.Debug.PprofAddr = config.PprofAddrOff return cfg, nil } b := &boot{}