Hold the keys in the walk-beside test so its walks stay open (issue 1931)
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user