ccl/sqlproxyccl: add a test of closing the underlying connection#57385
Conversation
petermattis
left a comment
There was a problem hiding this comment.
assuming I'm understanding the test correctly.
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @jbowens, @petermattis, and @spaskob)
pkg/ccl/sqlproxyccl/proxy_test.go, line 257 at r1 (raw file):
func TestProxyTLSClose(t *testing.T) { defer leaktest.AfterTest(t)()
Is this what is actually testing that that the io.Copy goroutines are being torn down correctly when Close() is called? Might be worth a comment somewhere in this test if that is accurate as I generally think of the leaktest checks as being boilerplate, but in this case it is a critical part of the test.
petermattis
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @jbowens and @spaskob)
pkg/ccl/sqlproxyccl/proxy_test.go, line 289 at r1 (raw file):
incomingConn := proxyIncomingConn.Load().(*Conn) require.NoError(t, incomingConn.Close()) <-incomingConn.Done() // should immediately proceed
I think the unused lint hack for Conn.Done can be removed.
spaskob
left a comment
There was a problem hiding this comment.
thanks for adding the test!
3329dc9 to
a042eb8
Compare
jbowens
left a comment
There was a problem hiding this comment.
Reviewable status:
complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @petermattis)
pkg/ccl/sqlproxyccl/proxy_test.go, line 257 at r1 (raw file):
Previously, petermattis (Peter Mattis) wrote…
Is this what is actually testing that that the
io.Copygoroutines are being torn down correctly whenClose()is called? Might be worth a comment somewhere in this test if that is accurate as I generally think of theleaktestchecks as being boilerplate, but in this case it is a critical part of the test.
Done.
pkg/ccl/sqlproxyccl/proxy_test.go, line 289 at r1 (raw file):
Previously, petermattis (Peter Mattis) wrote…
I think the unused lint hack for
Conn.Donecan be removed.
Done.
Release note: none
a042eb8 to
cbe3912
Compare
|
TFTRs! bors r+ |
|
Build succeeded: |
Release note: none