Detect go routine leaks in integration testcases #73
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This Pull-Requests enables running the goleak Go-Routine leak detector after all integration testcases ran.
This will help to ensure that termination routines of the amqp package terminate all go-routines it started correctly.
The PR also adds missing connection Close calls to multiple integration testcases. The goleak detector complained that those were leaking the heartbeat routine
The goleak detector is used in the PR #70.
I decided to introduce it in a separate PR because is not strictly related to fixing the reader go-routine leak and allows to distinguish issues introduced by #70 and existing issues.