You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[receiver/sqlquery] Fix memory leak and failing tests (#31785)
**Description:** <Describe what has changed.>
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
This PR includes two changes that are dependent on each other.
1. Fix test failing in
#31778.
Explanation given
[here.](#31778 (comment))
All changes in `integration_test.go` are related to this.
2. When the test was fixed, `goleak` started failing. The logs receiver
opens a DB connection when it's started, but shutdown does not close the
DB. This DB needs to be closed during shutdown to avoid a leaked
goroutine. All changes outside of `integration_test.go` are for this.
3. Since the memory leak changes were modifying errors, I moved from
using `multierr.append` to `errors.Join` as well.
**Link to tracking Issue:** <Issue number if applicable>
Resolves#31782
Related to
#31778
**Testing:** <Describe what testing was performed and which tests were
added.>
Tests are passing
0 commit comments