Assert the cut takes its first tier from the key at the carried commit, since the cut asks no build (issue 1931)
This commit is contained in:
@@ -65,7 +65,7 @@ func cutAt(t *testing.T, open *stores, now time.Time) {
|
|||||||
func TestTwoMergesSecondsApartAreOneWalkAtTheLaterCommit(t *testing.T) {
|
func TestTwoMergesSecondsApartAreOneWalkAtTheLaterCommit(t *testing.T) {
|
||||||
open := windowed(t)
|
open := windowed(t)
|
||||||
everyHeadWaits(t)
|
everyHeadWaits(t)
|
||||||
asked := asksWithPaths(t)
|
asksWithPaths(t)
|
||||||
claude := catalogueMerge("553b7191claude", "app", t0)
|
claude := catalogueMerge("553b7191claude", "app", t0)
|
||||||
dunst := catalogueMerge("48bda475dunst", "notes", t0.Add(17*time.Second))
|
dunst := catalogueMerge("48bda475dunst", "notes", t0.Add(17*time.Second))
|
||||||
hear(t, open, claude, t0.Add(time.Second))
|
hear(t, open, claude, t0.Add(time.Second))
|
||||||
@@ -96,8 +96,12 @@ func TestTwoMergesSecondsApartAreOneWalkAtTheLaterCommit(t *testing.T) {
|
|||||||
if w.Delivery == nil || !slices.EqualFunc(w.Delivery.Merges, want, sameMerge) {
|
if w.Delivery == nil || !slices.EqualFunc(w.Delivery.Merges, want, sameMerge) {
|
||||||
t.Fatalf("the walk answers %+v, want %+v", w.Delivery, want)
|
t.Fatalf("the walk answers %+v, want %+v", w.Delivery, want)
|
||||||
}
|
}
|
||||||
if len(*asked) != 2 || (*asked)[0][2] != "main" || (*asked)[1][2] != "main" {
|
// The cut takes its first tier from the builder's keys (a look takes them in later; none runs here), and says at
|
||||||
t.Fatalf("the walk did not ask its modules at the branch, which holds the commit it carries: %v", *asked)
|
// which commit: the one the branch holds, which is the later merge the walk carries.
|
||||||
|
for _, m := range w.Tiers[w.Tier] {
|
||||||
|
if s := w.Modules[m]; s == nil || !s.Key || s.State != "asked" || s.KeyAt != dunst.Commit {
|
||||||
|
t.Fatalf("the walk did not take %s from its key at the commit it carries (%s): %+v", m, dunst.Commit, s)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// Heard again, as the bus may hand it over twice: never a second merge, nor a second walk.
|
// Heard again, as the bus may hand it over twice: never a second merge, nor a second walk.
|
||||||
hear(t, open, claude, t0.Add(5*time.Minute))
|
hear(t, open, claude, t0.Add(5*time.Minute))
|
||||||
|
|||||||
Reference in New Issue
Block a user