mirror of
https://github.com/jeremyd/ergo.git
synced 2026-08-14 01:04:51 -07:00
d47d7a8bdf
TestEmptyBuffer added items without an explicit Message.Time, letting Add() stamp them with time.Now().UTC(), then immediately queried with end = time.Now() as the (exclusive) upper bound. On platforms where the wall clock has coarse resolution -- macOS ticks in 1us increments, so consecutive time.Now() calls usually return identical wall times -- the item's timestamp equals the query bound, item.Message.Time.Before(before) is false, and the item is excluded. The test then panics indexing the empty result slice. On Apple Silicon this fails nearly deterministically; Linux's nanosecond-resolution clock is why CI never caught it. Use explicit fixed timestamps via easyItem, matching every other test in this file.