forked from jaegertracing/jaeger
-
Notifications
You must be signed in to change notification settings - Fork 0
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 (jaegertracing#5340)
## Which problem is this PR solving? - Solves part of jaegertracing#5006 ## Description of the changes - 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. ## How was this change tested? - While this change does not include a call to activate goleak, it _was_ tested with this. The PR does not include goleak detection because there are still other violations related to elasticsearch in this package. ## Checklist - [x] I have read https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md - [x] I have signed all commits - [ ] I have added unit tests for the new functionality - [ ] I have run lint and test steps successfully - for `jaeger`: `make lint test` - for `jaeger-ui`: `yarn lint` and `yarn test` --------- Signed-off-by: Will Sewell <willsewell@monzo.com> Signed-off-by: Yuri Shkuro <github@ysh.us> Co-authored-by: Yuri Shkuro <github@ysh.us> Signed-off-by: Vamshi Maskuri <gwcchintu@gmail.com>
- Loading branch information
1 parent
d1958c0
commit f5789ff
Showing
3 changed files
with
29 additions
and
9 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