Skip to content

Commit

Permalink
Merge pull request #1252 from ipfs/fix-bitswap-ci
Browse files Browse the repository at this point in the history
bitswap/test: fix timeout on travis
  • Loading branch information
jbenet committed May 19, 2015
2 parents c561c09 + d7794c7 commit c153554
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dist: trusty
# dist: trusty # KVM Setup

os:
- linux
Expand Down
9 changes: 8 additions & 1 deletion exchange/bitswap/bitswap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

detectrace "github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-detect-race"
context "github.com/ipfs/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
travis "github.com/ipfs/go-ipfs/util/testutil/ci/travis"

blocks "github.com/ipfs/go-ipfs/blocks"
blocksutil "github.com/ipfs/go-ipfs/blocks/blocksutil"
Expand Down Expand Up @@ -98,6 +99,8 @@ func TestLargeSwarm(t *testing.T) {
// when running with the race detector, 500 instances launches
// well over 8k goroutines. This hits a race detector limit.
numInstances = 100
} else if travis.IsRunning() {
numInstances = 200
} else {
t.Parallel()
}
Expand All @@ -108,7 +111,11 @@ func TestLargeFile(t *testing.T) {
if testing.Short() {
t.SkipNow()
}
t.Parallel()

if !travis.IsRunning() {
t.Parallel()
}

numInstances := 10
numBlocks := 100
PerformDistributionTest(t, numInstances, numBlocks)
Expand Down

0 comments on commit c153554

Please sign in to comment.