Review of issue 977: keep the plan's own order for its gates, hold a group only for a composed mesh-delivery, keep mark-ready one release, compare with the batch's start, fail a lone cycle (issue 977)
This commit is contained in:
@@ -121,3 +121,19 @@ func TestAHeldBatchSurvivesARestart(t *testing.T) {
|
||||
t.Fatalf("after an hour: %d walk(s), batches %+v", len(ws), bs)
|
||||
}
|
||||
}
|
||||
|
||||
// A mesh-delivery that does not yet say the group's gate is composed merges member two only after member one is
|
||||
// delivered, so a batch held for it would wait for ever: the merge waits for the window, as before.
|
||||
func TestAnOlderMeshDeliverysGroupIsNotHeldOpen(t *testing.T) {
|
||||
open := windowed(t)
|
||||
asksWithPaths(t)
|
||||
groupStatesFrom(t, "feat/g", map[string]string{"novox/one": "ready", "novox/two": "ready"}, false)
|
||||
hear(t, open, fromHead(repoMerge("one", "c1", t0), "feat/g"), t0)
|
||||
if _, bs := walks(t, open); len(bs) != 1 || len(bs[0].Delivery.Batch.Holds) != 0 {
|
||||
t.Fatalf("held for an older mesh-delivery's group: %+v", bs)
|
||||
}
|
||||
cutAt(t, open, t0.Add(90*time.Second))
|
||||
if ws, bs := walks(t, open); len(ws) != 1 || len(bs) != 0 {
|
||||
t.Fatalf("at its window: %d walk(s), %d batch(es)", len(ws), len(bs))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user