mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-03 11:57:39 +03:00
Fix vectorised writer test
This commit is contained in:
parent
2e36fa6849
commit
81d1bc2768
1 changed files with 3 additions and 5 deletions
|
@ -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)
|
||||
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue