Skip to content

Commit 98c05b3

Browse files
authored
test(agent/agentssh): fix macos signal flake during close (#17313)
Fixes coder/internal#558
1 parent 109e73b commit 98c05b3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

agent/agentssh/agentssh_test.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313
"strings"
1414
"sync"
1515
"testing"
16+
"time"
1617

1718
"github.com/prometheus/client_golang/prometheus"
1819
"github.com/spf13/afero"
@@ -200,7 +201,11 @@ func TestNewServer_CloseActiveConnections(t *testing.T) {
200201
}
201202
assert.NoError(t, err)
202203

204+
// Allow the session to settle (i.e. reach echo).
203205
pty.ExpectMatchContext(ctx, "started")
206+
// Sleep a bit to ensure the sleep has started.
207+
time.Sleep(testutil.IntervalMedium)
208+
204209
close(ch)
205210

206211
err = sess.Wait()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy