From 4db2a7d4f5a2edfedc24d0f7d0a1e687075c87f2 Mon Sep 17 00:00:00 2001 From: Carson Ip Date: Wed, 9 Oct 2024 12:35:20 +0100 Subject: [PATCH] Fix flaky TestNewInstrumentation test on Windows Fixes #14311 --- internal/beater/beater_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/beater/beater_test.go b/internal/beater/beater_test.go index 289ef975303..f7fbdad816e 100644 --- a/internal/beater/beater_test.go +++ b/internal/beater/beater_test.go @@ -279,6 +279,7 @@ func TestNewInstrumentation(t *testing.T) { i, err := newInstrumentation(cfg) require.NoError(t, err) tracer := i.Tracer() + defer tracer.Close() tracer.StartTransaction("name", "type").End() tracer.Flush(nil) assert.Equal(t, map[string]string{"k1": "val", "k2": "new val"}, <-labels)