Skip to content

Commit

Permalink
fixup! better error output
Browse files Browse the repository at this point in the history
  • Loading branch information
jbenet committed Jun 15, 2015
1 parent ff29878 commit 9505b64
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion transport/test/ttest.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,12 @@ func SubtestStressNSwarmNConnNStreamNMsg(t *testing.T, tr pst.Transport, nSwarm,
buf2 := make([]byte, msgsize)
i := 0
for buf1 := range bufs {
log("%p reading %d bytes (message %d/%d #%x)", s, len(buf1), i, nMsg, buf1[:3])
i++
log("%p reading %d bytes (message %d/%d #%x)", s, len(buf1), i-1, nMsg, buf1[:3])

if _, err := io.ReadFull(s, buf2); err != nil {
errs <- fmt.Errorf("io.ReadFull(s, buf2): %s", err)
log("%p failed to read %d bytes (message %d/%d #%x)", s, len(buf1), i-1, nMsg, buf1[:3])
continue
}
if !bytes.Equal(buf1, buf2) {
Expand Down

0 comments on commit 9505b64

Please sign in to comment.