Skip to content

Commit

Permalink
[cmd/opampsupervisor] Fix leaks in e2e tests (#32477)
Browse files Browse the repository at this point in the history
**Description:** Fix leaks in e2e tests

**Link to tracking Issue:** resolve #30931
  • Loading branch information
haoqixu authored Apr 17, 2024
1 parent 6f25527 commit 0ad3cc9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
1 change: 1 addition & 0 deletions cmd/opampsupervisor/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@ func TestSupervisorOpAMPConnectionSettings(t *testing.T) {
},
},
})
waitForSupervisorConnection(newServer.supervisorConnected, true)

require.Eventually(t, func() bool {
return connectedToNewServer.Load() == true
Expand Down
14 changes: 14 additions & 0 deletions cmd/opampsupervisor/package_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package main

import (
"testing"

"go.uber.org/goleak"
)

func TestMain(m *testing.M) {
goleak.VerifyTestMain(m)
}

0 comments on commit 0ad3cc9

Please sign in to comment.