mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
test(agent/agentssh): fix macos signal flake during close (#17313)
Fixes coder/internal#558
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/spf13/afero"
|
||||
@@ -200,7 +201,11 @@ func TestNewServer_CloseActiveConnections(t *testing.T) {
|
||||
}
|
||||
assert.NoError(t, err)
|
||||
|
||||
// Allow the session to settle (i.e. reach echo).
|
||||
pty.ExpectMatchContext(ctx, "started")
|
||||
// Sleep a bit to ensure the sleep has started.
|
||||
time.Sleep(testutil.IntervalMedium)
|
||||
|
||||
close(ch)
|
||||
|
||||
err = sess.Wait()
|
||||
|
||||
Reference in New Issue
Block a user