]> git.feebdaed.xyz Git - 0xmirror/kubernetes.git/commitdiff
Fix issue with test not sending history deterministically
authorMichael Aspinwall <maspinwall@google.com>
Fri, 19 Dec 2025 00:45:43 +0000 (00:45 +0000)
committerMichael Aspinwall <maspinwall@google.com>
Fri, 19 Dec 2025 01:41:38 +0000 (01:41 +0000)
staging/src/k8s.io/client-go/tools/cache/controller_test.go

index eb96021ff3612c70c6eb63f788e0c27bc9207607..1456e5eaa0b653a42b1c0d117fa77958f39d7170 100644 (file)
@@ -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")
                        }