mesh-delivery-gate: judge a refused follow-ends by what it wrote, not by the history's last line
The subtest of gate_records_follow_ends read the ledger history's last line to see that nothing was written when the hand-act log refused. The setup ends three entries in a loop over a map, so in about one run in six that last line already read "<moverX> end" and the check failed though nothing new was written: main.539's integration step of mesh-delivery-gate failed this way. The check now holds that the history does not grow across the refused call, whatever order the setup used. No test is added or removed (the gate is over its test budget). Builds: no design line; a test-only fix under issue 1984 (H2's delivery). The behaviour the subtest holds, H-A-634 (7), is unchanged.
This commit is contained in:
@@ -1101,8 +1101,9 @@ func TestTheRecordsToolsReadThemAndEndOneByHand(t *testing.T) {
|
||||
if _, err := rs.FollowEnds("", log); err == nil {
|
||||
t.Fatal("followed with no reason")
|
||||
}
|
||||
if _, err := rs.FollowEnds("the indexes were rebuilt", log); err == nil || len(l.history) == 0 || strings.HasSuffix(l.history[len(l.history)-1], moverX+" end") {
|
||||
t.Fatalf("followed though the hand-act log refused it: %v", err)
|
||||
before := len(l.history)
|
||||
if _, err := rs.FollowEnds("the indexes were rebuilt", log); err == nil || len(l.history) != before {
|
||||
t.Fatalf("followed though the hand-act log refused it: %v (wrote %v)", err, l.history[before:])
|
||||
}
|
||||
endedOf := func(inst string) any {
|
||||
var st map[string]any
|
||||
|
||||
Reference in New Issue
Block a user