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

Potential goroutine leak in TestDialTLSHandshakeTimeout #641

Closed
Jay-deng opened this issue Mar 7, 2023 · 1 comment · Fixed by #643
Closed

Potential goroutine leak in TestDialTLSHandshakeTimeout #641

Jay-deng opened this issue Mar 7, 2023 · 1 comment · Fixed by #643

Comments

@Jay-deng
Copy link

Jay-deng commented Mar 7, 2023

When I run some test on https://github.com/gomodule/redigo/blob/master/redis/conn_test.go, I get the following output information when running TestDialTLSHandshakeTimeout:

image

So I was wondering if there is a goroutine leak in that case?

stevenh added a commit that referenced this issue Mar 8, 2023
Ensure that goroutines started by tests are cleaned up on termination.

Also make TestLatencyHistories compatible with -count=X.

Fixes #641
@stevenh
Copy link
Collaborator

stevenh commented Mar 8, 2023

That test is designed to trigger a timeout. The close of the netConn in redis.DialContext should result in the TLS handshake returning an error but the test io.Reader never returns io.EOF so yes this is a leak but it's a leak in the test not the package.

Please try #643

stevenh added a commit that referenced this issue May 11, 2023
Ensure that goroutines started by tests are cleaned up on termination.

Also:
* make TestLatencyHistories compatible with -count=X.
* Update to the supported versions of go 1.19 and 1.20.
* Update golangci-lint to v1.15.2

Fixes #641
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 a pull request may close this issue.

2 participants