mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
fix: ignore yamux.ErrSessionShutdown on TestTailnetAPIConnector_Disconnects (#13532)
This commit is contained in:
@ -10,6 +10,7 @@ import (
|
|||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
|
"github.com/hashicorp/yamux"
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
"nhooyr.io/websocket"
|
"nhooyr.io/websocket"
|
||||||
@ -34,8 +35,10 @@ func TestTailnetAPIConnector_Disconnects(t *testing.T) {
|
|||||||
testCtx := testutil.Context(t, testutil.WaitShort)
|
testCtx := testutil.Context(t, testutil.WaitShort)
|
||||||
ctx, cancel := context.WithCancel(testCtx)
|
ctx, cancel := context.WithCancel(testCtx)
|
||||||
logger := slogtest.Make(t, &slogtest.Options{
|
logger := slogtest.Make(t, &slogtest.Options{
|
||||||
// we get EOF when we simulate a DERPMap error
|
IgnoredErrorIs: append(slogtest.DefaultIgnoredErrorIs,
|
||||||
IgnoredErrorIs: append(slogtest.DefaultIgnoredErrorIs, io.EOF),
|
io.EOF, // we get EOF when we simulate a DERPMap error
|
||||||
|
yamux.ErrSessionShutdown, // coordination can throw these when DERP error tears down session
|
||||||
|
),
|
||||||
}).Leveled(slog.LevelDebug)
|
}).Leveled(slog.LevelDebug)
|
||||||
agentID := uuid.UUID{0x55}
|
agentID := uuid.UUID{0x55}
|
||||||
clientID := uuid.UUID{0x66}
|
clientID := uuid.UUID{0x66}
|
||||||
|
Reference in New Issue
Block a user