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

This commit is contained in:
Marten Seemann 2022-04-26 14:24:18 +01:00 committed by GitHub
parent 4a572e7eb4
commit c130e6e96c
1 changed files with 3 additions and 2 deletions

View File

@ -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
}
}
}
@ -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
}
}
}