Read the started walk again before ending it in the let-go test: the steps wrote it (issue 1931)

This commit is contained in:
2026-10-24 04:23:23 +02:00
parent 893aa85349
commit a1969403c6
@@ -554,7 +554,11 @@ func TestAWalkLetGoBesideAStartedOneStartsOnceItEnded(t *testing.T) {
t.Fatalf("a deferred walk is watched as a tier running late: %+v", f)
}
}
done := started[0]
// Read again: the steps since wrote the started walk (what its key waits for), so the copy read at its cut is stale.
done, err := open.inventory.PlanByID(ctx, started[0].ID)
if err != nil {
t.Fatal(err)
}
done.State = inventory.PlanDone
if err := open.inventory.SavePlan(ctx, &done); err != nil {
t.Fatal(err)