mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-29 01:12:24 +08:00
swarm test: reporting errors fix
This commit is contained in:
@ -139,7 +139,10 @@ func SubtestSwarm(t *testing.T, SwarmNum int, MsgNum int) {
|
||||
for k := 0; k < MsgNum; k++ { // with k messages
|
||||
msg := "ping"
|
||||
log.Debugf("%s %s %s (%d)", s1.local, msg, p, k)
|
||||
stream.Write([]byte(msg))
|
||||
if _, err := stream.Write([]byte(msg)); err != nil {
|
||||
errChan <- err
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
// read it later
|
||||
@ -200,7 +203,7 @@ func SubtestSwarm(t *testing.T, SwarmNum int, MsgNum int) {
|
||||
// check any errors (blocks till consumer is done)
|
||||
for err := range errChan {
|
||||
if err != nil {
|
||||
t.Fatal(err.Error())
|
||||
t.Error(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user