Skip to content

Commit 2237dd8

Browse files
craig[bot]sanki92
andcommitted
Merge #156729
156729: Add grpc connection closing error to allowlist r=andyyang890 a=sanki92 ## Fix TestChangefeedFlushesSinkToReleaseMemory test flake Fixes #156078 The test was failing on grpc connection closing errors that weren't being ignored. Using `grpcutil.IsClosedConnection()` to properly handle all connection closing scenarios including the specific "grpc: the client connection is closing" error. **Changed:** - `pkg/ccl/changefeedccl/helpers_test.go`: Use `grpcutil.IsClosedConnection()` in error handling Co-authored-by: shanky <sankalpt92@gmail.com>
2 parents 7c168dd + 5e9925c commit 2237dd8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

pkg/ccl/changefeedccl/BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ go_test(
343343
"//pkg/util/ctxgroup",
344344
"//pkg/util/duration",
345345
"//pkg/util/encoding",
346+
"//pkg/util/grpcutil",
346347
"//pkg/util/hlc",
347348
"//pkg/util/intsets",
348349
"//pkg/util/ioctx",

pkg/ccl/changefeedccl/helpers_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ import (
5454
"github.com/cockroachdb/cockroach/pkg/testutils/skip"
5555
"github.com/cockroachdb/cockroach/pkg/testutils/sqlutils"
5656
"github.com/cockroachdb/cockroach/pkg/util"
57+
"github.com/cockroachdb/cockroach/pkg/util/grpcutil"
5758
"github.com/cockroachdb/cockroach/pkg/util/hlc"
5859
"github.com/cockroachdb/cockroach/pkg/util/json"
5960
"github.com/cockroachdb/cockroach/pkg/util/log"
@@ -941,7 +942,7 @@ func requireNoFeedsFail(t *testing.T) (fn updateKnobsFn) {
941942
`context canceled`,
942943
}
943944
shouldIgnoreErr := func(err error) bool {
944-
if err == nil || errors.Is(err, context.Canceled) {
945+
if err == nil || errors.Is(err, context.Canceled) || grpcutil.IsClosedConnection(err) {
945946
return true
946947
}
947948
for _, ignoreErr := range ignoreErrs {

0 commit comments

Comments
 (0)