From 9131ef0dbc04d1198f98f0e5abde079c713d575d Mon Sep 17 00:00:00 2001 From: jochen Date: Sat, 24 Oct 2026 04:40:00 +0200 Subject: [PATCH] Hold the keys in the walk-beside test so its walks stay open (issue 1931) --- cmd/mesh-controller/beside_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmd/mesh-controller/beside_test.go b/cmd/mesh-controller/beside_test.go index 0d417830..d3626c82 100644 --- a/cmd/mesh-controller/beside_test.go +++ b/cmd/mesh-controller/beside_test.go @@ -4,6 +4,7 @@ package main import ( "strings" + "sync/atomic" "testing" "time" @@ -15,6 +16,14 @@ import ( func TestAnUnrelatedBatchWalksBesideAnOpenWalk(t *testing.T) { open := windowed(t) asksWithPaths(t) + // Both modules' keys are not built, so each walk stays open as it did while its build ran: with the stand-in + // builder's key done at once, one step would carry a one-module walk to done. + wholeKeys, held := openPlanKeys, &atomic.Bool{} + held.Store(true) + openPlanKeys = func() (planKeyReads, func(), error) { + all, done, err := wholeKeys() + return keysHolding{keysHolding{all, "one", held, ""}, "two", held, ""}, done, err + } ctx := t.Context() hear(t, open, repoMerge("one", "c1", t0), t0) cutAt(t, open, t0.Add(90*time.Second))