Skip to content

Commit 026b63e

Browse files
committed
receive does not support closed ch
1 parent f495019 commit 026b63e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

agent/agentssh/agentssh_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,11 @@ func TestNewServer_CloseActiveConnections(t *testing.T) {
214214
}
215215

216216
for _, ch := range waitConns {
217-
testutil.RequireReceive(ctx, t, ch)
217+
select {
218+
case <-ctx.Done():
219+
t.Fatal("timeout")
220+
case <-ch:
221+
}
218222
}
219223

220224
return s, wg.Wait

0 commit comments

Comments
 (0)