From 24c6a36c162d3371fe79f6791c91ddd1eee2f8f5 Mon Sep 17 00:00:00 2001 From: Paulo Janotti Date: Mon, 9 Dec 2024 12:23:13 -0800 Subject: [PATCH] [chore] Fix TestPerfCounter_Reset test (#36726) #### Description Fix the TestPerfCounter_Reset that is failing consistently. ```terminal === FAIL: . TestPerfCounter_Reset (0.00s) watcher_test.go:131: Error Trace: D:/a/opentelemetry-collector-contrib/opentelemetry-collector-contrib/pkg/winperfcounters/watcher_test.go:131 Error: Both arguments must be pointers Test: TestPerfCounter_Reset ``` Root case: after upgrading `testify` circa of 2 weeks ago, since it included: > NotSame should fail if args are not pointers https://github.com/stretchr/testify/issues/1661 by @sikehish in https://github.com/stretchr/testify/pull/1664 See https://github.com/stretchr/testify/releases #### Testing Local test run Co-authored-by: Antoine Toulme --- pkg/winperfcounters/watcher_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/winperfcounters/watcher_test.go b/pkg/winperfcounters/watcher_test.go index 0f671916288b..72569a6339a7 100644 --- a/pkg/winperfcounters/watcher_test.go +++ b/pkg/winperfcounters/watcher_test.go @@ -128,7 +128,7 @@ func TestPerfCounter_Reset(t *testing.T) { // new query is different instance of same counter. require.NoError(t, err) - assert.NotSame(t, handle, pc.handle) + assert.NotEqual(t, handle, pc.handle) assert.NotSame(t, query, pc.query) assert.Equal(t, path, pc.Path())