Skip to content

Commit

Permalink
Use readfull
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoPolo committed Nov 14, 2024
1 parent 25fc05d commit 5d36189
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func TestSampledConn(t *testing.T) {
assert.Equal(t, "hel", string(peeked[:]))

buf := make([]byte, 5)
_, err = clientConn.Read(buf)
_, err = io.ReadFull(clientConn, buf)
assert.NoError(t, err)
assert.Equal(t, "hello", string(buf))
} else {
Expand Down

0 comments on commit 5d36189

Please sign in to comment.