From c007f3650f87a2c9e6327a123a730bf1d56406e8 Mon Sep 17 00:00:00 2001 From: Viktor Liu Date: Thu, 9 Jul 2026 06:16:07 +0200 Subject: [PATCH] Fix TestResetAggregationWindow flakiness on coarse clocks --- client/internal/netflow/store/event_aggregation_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client/internal/netflow/store/event_aggregation_test.go b/client/internal/netflow/store/event_aggregation_test.go index c0422e8b7..765149be3 100644 --- a/client/internal/netflow/store/event_aggregation_test.go +++ b/client/internal/netflow/store/event_aggregation_test.go @@ -176,6 +176,9 @@ func TestFlowAggregationOfUnknownProtocols(t *testing.T) { func TestResetAggregationWindow(t *testing.T) { store := NewAggregatingMemoryStore() + // Backdate the window start so the reset produces a different timestamp + // even on platforms with coarse clock granularity. + store.WindowStart = store.WindowStart.Add(-time.Second) store.StoreEvent(&types.Event{ ID: uuid.New(), Timestamp: time.Now(),