From e07f72a3ec41c39be080d2a341fa91da1c96ae45 Mon Sep 17 00:00:00 2001 From: Michael Aspinwall Date: Fri, 19 Dec 2025 00:45:43 +0000 Subject: [PATCH] Fix issue with test not sending history deterministically Kubernetes-commit: 2b330f0357cb825de0dc196b426c858b2bba7f2c --- tools/cache/controller_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/cache/controller_test.go b/tools/cache/controller_test.go index eb96021ff..1456e5eaa 100644 --- a/tools/cache/controller_test.go +++ b/tools/cache/controller_test.go @@ -995,6 +995,9 @@ func testReplaceEvents(t *testing.T, ctx context.Context, fifo Queue, m *eventRe for _, tc := range tcs { t.Run(tc.name, func(t *testing.T) { + // Clear history so we don't get noise from previous tests. + m.clearHistory() + for _, obj := range tc.initialObjs { require.NoError(t, fifo.Add(obj), "failed to add") }