diff options
author | Tamir Duberstein <tamird@google.com> | 2021-01-15 15:47:13 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-01-15 15:49:15 -0800 |
commit | 12d9790833cc2f6a9b197066a5ecbeb434f74164 (patch) | |
tree | e9eec8e4c755c33c5a30c1912422b28380ed1f53 /pkg/tcpip/tests/integration/route_test.go | |
parent | f37ace6661dfed8acae7e22ed0eb9ad78bdeab34 (diff) |
Remove count argument from tcpip.Endpoint.Read
The same intent can be specified via the io.Writer.
PiperOrigin-RevId: 352098747
Diffstat (limited to 'pkg/tcpip/tests/integration/route_test.go')
-rw-r--r-- | pkg/tcpip/tests/integration/route_test.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/pkg/tcpip/tests/integration/route_test.go b/pkg/tcpip/tests/integration/route_test.go index 76f7f54c6..b222d2b05 100644 --- a/pkg/tcpip/tests/integration/route_test.go +++ b/pkg/tcpip/tests/integration/route_test.go @@ -16,7 +16,6 @@ package integration_test import ( "bytes" - "math" "testing" "github.com/google/go-cmp/cmp" @@ -208,9 +207,9 @@ func TestLocalPing(t *testing.T) { var buf bytes.Buffer opts := tcpip.ReadOptions{NeedRemoteAddr: true} - res, err := ep.Read(&buf, math.MaxUint16, opts) + res, err := ep.Read(&buf, opts) if err != nil { - t.Fatalf("ep.Read(_, %d, %#v): %s", math.MaxUint16, opts, err) + t.Fatalf("ep.Read(_, %#v): %s", opts, err) } if diff := cmp.Diff(tcpip.ReadResult{ Count: buf.Len(), @@ -351,7 +350,7 @@ func TestLocalUDP(t *testing.T) { var clientAddr tcpip.FullAddress var readBuf bytes.Buffer - if read, err := server.Read(&readBuf, math.MaxUint16, tcpip.ReadOptions{NeedRemoteAddr: true}); err != nil { + if read, err := server.Read(&readBuf, tcpip.ReadOptions{NeedRemoteAddr: true}); err != nil { t.Fatalf("server.Read(_): %s", err) } else { clientAddr = read.RemoteAddr @@ -393,7 +392,7 @@ func TestLocalUDP(t *testing.T) { <-clientCH readBuf.Reset() - if read, err := client.Read(&readBuf, math.MaxUint16, tcpip.ReadOptions{NeedRemoteAddr: true}); err != nil { + if read, err := client.Read(&readBuf, tcpip.ReadOptions{NeedRemoteAddr: true}); err != nil { t.Fatalf("client.Read(_): %s", err) } else { if diff := cmp.Diff(tcpip.ReadResult{ |