Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect go routine leaks in integration testcases #73

Merged
merged 2 commits into from
Apr 19, 2022

Conversation

fho
Copy link
Contributor

@fho fho commented Apr 19, 2022

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.

fho added 2 commits April 19, 2022 13:07
The goleak detector from uber is now run on the end of an integration
test run.
If the package or a testcase does not terminate all go-routines it
started, it will now cause testcase failures.

This will help to detect go-routine leaks in the package.
The goleak detector that runs for all integration tests found that
multiple testcases were leaking go-routines because the did not close
the connections they opened.

Close the connection via t.Cleanup() in those testcases.
@lukebakken
Copy link
Contributor

Thank you

lukebakken added a commit that referenced this pull request Apr 19, 2022
This reverts commit 02f3715, reversing
changes made to 6cac2fa.
lukebakken added a commit that referenced this pull request Apr 19, 2022
Detect go routine leaks in integration testcases

(cherry picked from commit 02f3715)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants