Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-bitswap
Commits
309229da
Commit
309229da
authored
Mar 02, 2015
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
testfix: dont break 8k goroutine limit under race
parent
f3c8024c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
bitswap_test.go
bitswap_test.go
+9
-1
No files found.
bitswap_test.go
View file @
309229da
...
@@ -6,7 +6,9 @@ import (
...
@@ -6,7 +6,9 @@ import (
"testing"
"testing"
"time"
"time"
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"
context
"github.com/jbenet/go-ipfs/Godeps/_workspace/src/golang.org/x/net/context"
blocks
"github.com/jbenet/go-ipfs/blocks"
blocks
"github.com/jbenet/go-ipfs/blocks"
blocksutil
"github.com/jbenet/go-ipfs/blocks/blocksutil"
blocksutil
"github.com/jbenet/go-ipfs/blocks/blocksutil"
tn
"github.com/jbenet/go-ipfs/exchange/bitswap/testnet"
tn
"github.com/jbenet/go-ipfs/exchange/bitswap/testnet"
...
@@ -93,9 +95,15 @@ func TestLargeSwarm(t *testing.T) {
...
@@ -93,9 +95,15 @@ func TestLargeSwarm(t *testing.T) {
if
testing
.
Short
()
{
if
testing
.
Short
()
{
t
.
SkipNow
()
t
.
SkipNow
()
}
}
t
.
Parallel
()
numInstances
:=
500
numInstances
:=
500
numBlocks
:=
2
numBlocks
:=
2
if
detectrace
.
WithRace
()
{
// when running with the race detector, 500 instances launches
// well over 8k goroutines. This hits a race detector limit.
numInstances
=
100
}
else
{
t
.
Parallel
()
}
PerformDistributionTest
(
t
,
numInstances
,
numBlocks
)
PerformDistributionTest
(
t
,
numInstances
,
numBlocks
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment