-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix goroutine leaks in grpc integration tests
The key issue was that the grpc client was only being killed in a `runtime.SetFinalizer` - i.e. when it is GCed. I think in the tests this was not shutting down before goleak had decided that the goroutine had leaked. This change switches to a more conventional approach of killing the client as part of the Close method and then ensuring this is called in each of the tests. While this change does not include a call to active goleak, it was tested with this. It does not include goleak detection because there are still other violations related to elasticsearch in this package. Signed-off-by: Will Sewell <[email protected]>
- Loading branch information
Will Sewell
committed
Apr 8, 2024
1 parent
ea53d8e
commit e1db93f
Showing
3 changed files
with
38 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters