Home | History | Annotate | Download | only in nettest

Lines Matching refs:Read

27 // as c1 and c2, such that anything written to c1 is read by c2 and vice-versa.
63 rand.New(rand.NewSource(0)).Read(want)
79 t.Errorf("unexpected c2.Read error: %v", err)
107 t.Errorf("unexpected Read error: %v", err)
140 // testRacyRead tests that it is safe to mutate the input Read buffer
157 _, err := c1.Read(b1)
196 // testReadTimeout tests that Read timeouts do not affect Write.
201 _, err := c1.Read(make([]byte, 1024))
208 // testWriteTimeout tests that Write timeouts do not affect Read.
215 if _, err := c1.Read(make([]byte, 1024)); err != nil {
216 t.Errorf("unexpected Read error: %v", err)
221 // Read and Write requests.
233 n, err = c1.Read(make([]byte, 1024))
235 t.Errorf("unexpected Read count: got %d, want 0", n)
243 // Read and Write operations immediately times out those operations.
259 n, err := c1.Read(make([]byte, 1024))
261 t.Errorf("unexpected Read count: got %d, want 0", n)
265 t.Error("Read timed out before deadline is set")
282 // Read and Write operations.
290 _, err := c1.Read(make([]byte, 1024))
309 // Read and Write operations.
329 _, err = c1.Read(buf)
357 c1.Read(make([]byte, 1024))
415 t.Errorf("roundtrip Read error: %v", err)
424 // It assumes that 0xff is not currently on the wire or in the read buffer.
434 n, err := c.Read(buf)
439 t.Errorf("unexpected Read error: %v", err)