mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
swarm/storage: increase mput timeout for TestCleanIndex
The following test failed with `-race` flag on Travis.
--- FAIL: TestCleanIndex (43.85s)
ldbstore_test.go:757: context deadline exceeded
As `-race` can increase the run time by 10x.
Alternative: we could just to increase the timeout for the
specific test. As currently the timeout is hardcoded and (strangely)
does not depend on the size of 'n'. That could be achieved by adding
a new function mputWithCustomTimeout(), but then we should keep
symmetry and add custom timeout for mget(), too. But I think the
method already has too many parameters and might be replaced by
the ongoing storage rewrite. So I won't do.
This commit is contained in:
parent
500a9fbbbb
commit
2102dec3f3
1 changed files with 1 additions and 1 deletions
|
|
@ -91,7 +91,7 @@ func mput(store ChunkStore, n int, f func(i int64) Chunk) (hs []Chunk, err error
|
|||
// put to localstore and wait for stored channel
|
||||
// does not check delivery error state
|
||||
errc := make(chan error)
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)
|
||||
defer cancel()
|
||||
for i := int64(0); i < int64(n); i++ {
|
||||
chunk := f(ch.DefaultSize)
|
||||
|
|
|
|||
Loading…
Reference in a new issue