aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerenc Szabo <frncmx@gmail.com>2019-02-05 21:34:34 +0800
committerAnton Evangelatov <anton.evangelatov@gmail.com>2019-02-05 21:34:34 +0800
commit1c3aa8d9b12d6104ccddecc1711bc6be2f5b269d (patch)
treeec3ac91a35c10c6636663b6a704acb0974462d3a
parentf413a3dbb2e674175da3a5b06ef1e88bad0ad02a (diff)
downloadgo-tangerine-1c3aa8d9b12d6104ccddecc1711bc6be2f5b269d.tar
go-tangerine-1c3aa8d9b12d6104ccddecc1711bc6be2f5b269d.tar.gz
go-tangerine-1c3aa8d9b12d6104ccddecc1711bc6be2f5b269d.tar.bz2
go-tangerine-1c3aa8d9b12d6104ccddecc1711bc6be2f5b269d.tar.lz
go-tangerine-1c3aa8d9b12d6104ccddecc1711bc6be2f5b269d.tar.xz
go-tangerine-1c3aa8d9b12d6104ccddecc1711bc6be2f5b269d.tar.zst
go-tangerine-1c3aa8d9b12d6104ccddecc1711bc6be2f5b269d.zip
swarm/storage: fix test timeout with -race by increasing mget timeout
-rw-r--r--swarm/network/simulations/discovery/discovery_test.go3
-rw-r--r--swarm/storage/common_test.go5
2 files changed, 3 insertions, 5 deletions
diff --git a/swarm/network/simulations/discovery/discovery_test.go b/swarm/network/simulations/discovery/discovery_test.go
index e695bc4ac..86aa6f6dd 100644
--- a/swarm/network/simulations/discovery/discovery_test.go
+++ b/swarm/network/simulations/discovery/discovery_test.go
@@ -362,9 +362,6 @@ func discoveryPersistenceSimulation(nodes, conns int, adapter adapters.NodeAdapt
return fmt.Errorf("error getting node string %s", err)
}
log.Info(nodeStr)
- for _, a := range addrs {
- log.Info(common.Bytes2Hex(a))
- }
if !healthy.ConnectNN || healthy.CountKnowNN == 0 {
isHealthy = false
break
diff --git a/swarm/storage/common_test.go b/swarm/storage/common_test.go
index bcc29d8cc..6c737af44 100644
--- a/swarm/storage/common_test.go
+++ b/swarm/storage/common_test.go
@@ -142,10 +142,11 @@ func mget(store ChunkStore, hs []Address, f func(h Address, chunk Chunk) error)
close(errc)
}()
var err error
+ timeout := 10 * time.Second
select {
case err = <-errc:
- case <-time.NewTimer(5 * time.Second).C:
- err = fmt.Errorf("timed out after 5 seconds")
+ case <-time.NewTimer(timeout).C:
+ err = fmt.Errorf("timed out after %v", timeout)
}
return err
}