Skip to content

Commit

Permalink
lower mock nodes in race test due to increased goroutines per connection
Browse files Browse the repository at this point in the history
  • Loading branch information
whyrusleeping committed Mar 31, 2015
1 parent ad7b82f commit 2ac344b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion p2p/net/mock/mock_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
protocol "github.com/jbenet/go-ipfs/p2p/protocol"
testutil "github.com/jbenet/go-ipfs/util/testutil"

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

Expand Down Expand Up @@ -358,8 +359,12 @@ func makePonger(st string) func(inet.Stream) {
}

func TestStreamsStress(t *testing.T) {
nnodes := 100
if detectrace.WithRace() {
nnodes = 50
}

mn, err := FullMeshConnected(context.Background(), 100)
mn, err := FullMeshConnected(context.Background(), nnodes)
if err != nil {
t.Fatal(err)
}
Expand Down

0 comments on commit 2ac344b

Please sign in to comment.