Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't continue on read / write error in stream suite #59

Merged
merged 1 commit into from
Apr 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions suites/transport/stream_suite.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ func SubtestStress(t *testing.T, ta, tb transport.Transport, maddr ma.Multiaddr,
bufs <- buf
if _, err := s.Write(buf); err != nil {
t.Errorf("s.Write(buf): %s", err)
continue
return
}
}
}
Expand All @@ -154,10 +154,11 @@ func SubtestStress(t *testing.T, ta, tb transport.Transport, maddr ma.Multiaddr,

if _, err := io.ReadFull(s, buf2); err != nil {
t.Errorf("io.ReadFull(s, buf2): %s", err)
continue
return
}
if !bytes.Equal(buf1, buf2) {
t.Errorf("buffers not equal (%x != %x)", buf1[:3], buf2[:3])
return
}
}
}
Expand Down