Skip to content

Commit 155e2d3

Browse files
committedAug 28, 2024
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: cockroachdb#119052, cockroachdb#128214 Release note: None
1 parent 79f7121 commit 155e2d3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

Diff for: ‎pkg/util/leaktest/leaktest.go

+4
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)
Please sign in to comment.