Skip to content

Commit fc400d6

Browse files
committed
chore: ignore 'session shutdown' yamux error in tests
1 parent cbbbb44 commit fc400d6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

testutil/logger.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package testutil
22

33
import (
44
"context"
5+
"github.com/hashicorp/yamux"
56
"strings"
67
"testing"
78

@@ -24,6 +25,11 @@ func IgnoreLoggedError(entry slog.SinkEntry) bool {
2425
if !ok {
2526
return false
2627
}
28+
// Yamux sessions get shut down when we are shutting down tests, so ignoring
29+
// them should reduce flakiness.
30+
if xerrors.Is(err, yamux.ErrSessionShutdown) {
31+
return true
32+
}
2733
// Canceled queries usually happen when we're shutting down tests, and so
2834
// ignoring them should reduce flakiness. This also includes
2935
// context.Canceled and context.DeadlineExceeded errors, even if they are

0 commit comments

Comments
 (0)