-
Notifications
You must be signed in to change notification settings - Fork 147
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
Add support for regex filter #37
Comments
Substring and regex filters seem OK, but it might be better to start with an explicit "IgnorePackage". Putting more generic skips makes it easier to accidentally ignore real leaks as well, so want to make it more specific to the type of leak being ignored. |
This comment has been minimized.
This comment has been minimized.
Is the server under control of the test? If so, closing the server will also close any keep-alive connections, and should avoid leaks. If the server is not under control of the test, but the client is, then the I would highly recommend closing all connections as part of your test cleaning up any created resources, as there definitely can be real leaks missed by ignoring all HTTP read/write goroutines. |
This comment has been minimized.
This comment has been minimized.
On the server side, closing the server will close idle connections, see documentation: |
This comment has been minimized.
This comment has been minimized.
That code actually has a leak -- it's not closing the response body. The leak is not an idle connection, but an active connection for a request that hasn't completed, because the response body has not been read and closed. Add a |
Considering that we may depend on some other repositories, but we don't care too much about those repos. An alternative would be to support regex filter.
The text was updated successfully, but these errors were encountered: