Matt Ouille
d47d7a8bdf
fix TestEmptyBuffer flakiness from timestamp collisions
...
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.
2026-07-07 16:57:20 -07:00
..
2025-05-25 01:59:55 -04:00
2026-07-07 07:31:06 +00:00
2025-02-12 21:15:21 -05:00
2021-05-26 15:55:24 -04:00
2020-02-20 00:09:39 -05:00
2023-01-04 05:06:21 -05:00
2025-04-07 00:24:08 -04:00
2021-11-30 03:27:40 -05:00
2024-08-02 15:09:28 -04:00
2026-07-07 16:57:20 -07:00
2026-03-12 21:48:37 -04:00
2025-04-06 02:59:03 -04:00
2026-06-30 12:13:56 -07:00
2021-02-17 15:14:53 -05:00
2022-08-10 02:47:39 -04:00
2020-10-12 15:06:17 -04:00
2020-03-22 18:18:48 -04:00
2026-04-20 00:56:48 -04:00
2026-03-12 21:32:13 -04:00
2024-02-13 18:58:32 -05:00
2025-12-22 03:26:09 -05:00
2026-03-12 21:48:37 -04:00
2025-02-12 21:15:21 -05:00
2021-07-03 04:41:42 +05:30
2026-03-20 04:15:29 +00:00
2026-07-01 07:12:17 +00:00
2026-03-10 17:50:01 -04:00
2022-05-05 22:43:33 -04:00
2022-05-05 22:34:43 -04:00
2026-05-31 23:47:52 -04:00
2026-05-31 23:47:52 -04:00
2026-04-15 01:48:29 -04:00
2026-05-08 04:25:09 +00:00
2026-05-31 23:47:52 -04:00
2025-06-15 04:06:45 -04:00
2026-05-31 23:47:52 -04:00
2025-05-07 22:09:08 -04:00
2023-04-14 02:15:56 -04:00
2026-07-07 00:28:04 -07:00
2026-06-30 12:13:56 -07:00
2026-03-15 05:56:31 -04:00
2026-07-07 00:28:04 -07:00
2020-05-21 11:42:17 -04:00
2025-01-13 21:47:21 -05:00
2021-05-26 15:55:24 -04:00
2026-03-12 21:48:37 -04:00
2022-08-22 23:23:17 -04:00
2023-08-15 20:57:52 -04:00
2026-05-19 03:08:39 +00:00
2026-07-07 00:28:04 -07:00
2026-07-07 00:28:04 -07:00
2026-06-30 12:13:56 -07:00
2025-05-23 00:18:36 -04:00
2023-01-04 05:06:21 -05:00
2025-01-13 21:47:21 -05:00
2023-01-22 14:45:16 -05:00
2025-01-13 22:20:47 -05:00
2023-01-04 05:06:21 -05:00
2026-04-15 01:48:29 -04:00
2025-05-23 00:18:36 -04:00
2025-06-22 18:59:42 -04:00
2026-07-07 00:28:04 -07:00
2022-05-05 22:34:43 -04:00
2022-05-05 22:34:43 -04:00
2026-01-10 18:57:49 -05:00
2026-07-07 00:28:04 -07:00
2025-12-01 07:03:26 +00:00
2026-05-31 23:47:52 -04:00
2026-01-11 02:27:37 -05:00
2025-01-13 21:47:21 -05:00
2026-04-28 04:56:46 +00:00
2025-03-30 21:32:55 -04:00
2026-04-15 01:48:29 -04:00
2021-05-26 15:55:24 -04:00
2023-01-04 05:06:21 -05:00
2026-07-07 07:31:06 +00:00
2025-02-05 00:47:23 -05:00
2021-06-18 02:43:25 -04:00
2022-09-02 04:25:39 -04:00
2020-05-28 15:53:14 +00:00
2026-03-15 03:47:33 -04:00
2026-03-12 21:48:37 -04:00
2023-04-14 02:15:56 -04:00
2026-05-19 03:08:39 +00:00
2020-10-21 11:08:55 -04:00
2022-08-10 02:47:39 -04:00
2026-03-22 01:38:47 -04:00
2019-03-12 04:16:16 -04:00
2019-03-12 04:16:16 -04:00
2026-04-13 22:50:24 -04:00