usage tests: TestReasoningReplyTimedByItsAnswer's timeline rows are made now, as LedgerSeries buckets today by the clock

The test gave LedgerSeries records dated 2026-10-06 14:30 UTC while
LedgerSeries reads today from time.Now(), so it passed only on 2026-10-06
and has failed on every machine since ("part: {Calls:0 ...}" just after
midnight CST on 10-07). The summary and row checks keep the fixed date;
the rows given to LedgerSeries take the clock's. go test -race
./internal/usage passes; gofmt and vet are clean.
This commit is contained in:
yetone committed 2026-10-07 00:16:20 +08:00
1 parent 764bbfdad5
commit 117b6c7fb4
1 file changed
+3
+3
View File
@@ -235,6 +235,9 @@ func TestReasoningReplyTimedByItsAnswer(t *testing.T) {
var lr []Row
for _, r := range recs {
rows.addRow(Row{Record: r})
// LedgerSeries buckets today by the clock, so the timeline's rows
// are made now
r.Time = time.Now()
lr = append(lr, Row{Record: r})
}
if rows.Timed != 6 || rows.DecodeMs != ms || rows.DecodeOut != out {