@cryptotaxi247 / kubo / commits / bc6911ef3

bitswap/test: fix timeout on travis

Juan Batiz-Benet committed May 19, 2015 at 16:53 UTC bc6911ef37fefcb5a36bfeb33dfa5e69f82feb97
1 file changed +8 -1
exchange/bitswap/bitswap_test.go
+8 -1
@@ -8,6 +8,7 @@ import (
8
9 detectrace "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-detect-race"
10 context "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
11 + travis "github.com/ipfs/go-ipfs/util/testutil/ci/travis"
12
13 blocks "github.com/ipfs/go-ipfs/blocks"
14 blocksutil "github.com/ipfs/go-ipfs/blocks/blocksutil"
@@ -98,6 +99,8 @@ func TestLargeSwarm(t *testing.T) {
99 // when running with the race detector, 500 instances launches
100 // well over 8k goroutines. This hits a race detector limit.
101 numInstances = 100
102 + } else if travis.IsRunning() {
103 + numInstances = 200
104 } else {
105 t.Parallel()
106 }
@@ -108,7 +111,11 @@ func TestLargeFile(t *testing.T) {
111 if testing.Short() {
112 t.SkipNow()
113 }
111 - t.Parallel()
114 +
115 + if !travis.IsRunning() {
116 + t.Parallel()
117 + }
118 +
119 numInstances := 10
120 numBlocks := 100
121 PerformDistributionTest(t, numInstances, numBlocks)