Skip to content

Commit 1c3aa8d

Browse files
frncmxnonsense
authored andcommitted
swarm/storage: fix test timeout with -race by increasing mget timeout
1 parent f413a3d commit 1c3aa8d

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

swarm/network/simulations/discovery/discovery_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,6 @@ func discoveryPersistenceSimulation(nodes, conns int, adapter adapters.NodeAdapt
362362
return fmt.Errorf("error getting node string %s", err)
363363
}
364364
log.Info(nodeStr)
365-
for _, a := range addrs {
366-
log.Info(common.Bytes2Hex(a))
367-
}
368365
if !healthy.ConnectNN || healthy.CountKnowNN == 0 {
369366
isHealthy = false
370367
break

swarm/storage/common_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,11 @@ func mget(store ChunkStore, hs []Address, f func(h Address, chunk Chunk) error)
142142
close(errc)
143143
}()
144144
var err error
145+
timeout := 10 * time.Second
145146
select {
146147
case err = <-errc:
147-
case <-time.NewTimer(5 * time.Second).C:
148-
err = fmt.Errorf("timed out after 5 seconds")
148+
case <-time.NewTimer(timeout).C:
149+
err = fmt.Errorf("timed out after %v", timeout)
149150
}
150151
return err
151152
}

0 commit comments

Comments
 (0)