Skip to content

Commit b351a5e

Browse files
security,jwtauthccl: Fix test failures due to leaked goroutines
We have been seeing intermittent test failures for `TestUseCerts` and `TestJWTAuthWithCustomCACert`. These failures have been due to a leaked goroutine that establishes a TLS handshake. The change is to ignore this goroutine while checking for leaked goroutines. Added a TODO to revisit this once we update Go to 1.23, as this seems to have been fixed: golang/go#62227. Epic: CRDB-36214, CRDB-40867 Fixes: #119052, #128214 Release note: None
1 parent 8407300 commit b351a5e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/util/leaktest/leaktest.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ func interestingGoroutines() map[int64]string {
6464
strings.Contains(stack, "github.com/jackc/pgconn/internal/ctxwatch.(*ContextWatcher).Watch.func1") ||
6565
// Ignore pq goroutine that watches for context cancellation.
6666
strings.Contains(stack, "github.com/lib/pq.(*conn).watchCancel") ||
67+
// Ignore TLS handshake related goroutine.
68+
// TODO(pritesh-lahoti): Revisit this once Go is updated to 1.23, as this seems to have been
69+
// fixed: https://github.com/golang/go/pull/62227.
70+
strings.Contains(stack, "net/http.(*persistConn).addTLS") ||
6771
// Seems to be gccgo specific.
6872
(runtime.Compiler == "gccgo" && strings.Contains(stack, "testing.T.Parallel")) ||
6973
// Ignore intentionally long-running logging goroutines that live for the

0 commit comments

Comments
 (0)