Skip to content

Commit ad65e1b

Browse files
Removed unneeded sync code in new test.
1 parent 0c58474 commit ad65e1b

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

ssh/agent/client_test.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import (
1313
"os/exec"
1414
"path/filepath"
1515
"strconv"
16-
"sync"
1716
"testing"
1817
"time"
1918

@@ -233,10 +232,7 @@ func TestServerResponseTooLarge(t *testing.T) {
233232
response.Keys = make([]byte, maxAgentResponseBytes+1)
234233

235234
agent := NewClient(a)
236-
var wg sync.WaitGroup
237-
wg.Add(1)
238235
go func() {
239-
defer wg.Done()
240236
n, _ := b.Write(ssh.Marshal(response))
241237
if n < 4 {
242238
t.Fatalf("At least 4 bytes (the response size) should have been successfully written: %d < 4", n)
@@ -249,10 +245,6 @@ func TestServerResponseTooLarge(t *testing.T) {
249245
if err.Error() != "agent: client error: response too large" {
250246
t.Fatal("Did not get expected error result")
251247
}
252-
// We need to explicitly close the client connection or else the server-side write call might block waiting for
253-
// the client to consume the entire message (which it shouldn't)
254-
a.Close()
255-
wg.Wait()
256248
}
257249

258250
func TestAuth(t *testing.T) {

0 commit comments

Comments
 (0)