Skip to content

Commit

Permalink
Fix vectorised writer test
Browse files Browse the repository at this point in the history
  • Loading branch information
nekohasekai committed Dec 21, 2023
1 parent d1aeb89 commit 14e1d8f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions common/bufio/net_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@ func TCPPipe(t *testing.T) (net.Conn, net.Conn) {
group.Append0(func(ctx context.Context) error {
var serverErr error
serverConn, serverErr = listener.Accept()
require.NoError(t, serverErr)
return nil
return serverErr
})
group.Append0(func(ctx context.Context) error {
var clientErr error
clientConn, clientErr = net.Dial("tcp", listener.Addr().String())
require.NoError(t, clientErr)
return nil
return clientErr
})
err = group.Run()
require.NoError(t, err)
Expand All @@ -53,7 +51,7 @@ func Timeout(t *testing.T) context.CancelFunc {
case <-ctx.Done():
return
case <-time.After(5 * time.Second):
t.Fatal("timeout")
t.Error("timeout")
}
}()
return cancel
Expand Down

0 comments on commit 14e1d8f

Please sign in to comment.