Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
9edbb2d9
Commit
9edbb2d9
authored
May 14, 2016
by
Jeromy
Browse files
test cleanup
parent
84d4e76e
Changes
1
Hide whitespace changes
Inline
Side-by-side
p2p/net/swarm/limiter_test.go
View file @
9edbb2d9
...
...
@@ -3,7 +3,6 @@ package swarm
import
(
"fmt"
"math/rand"
"runtime"
"strconv"
"testing"
"time"
...
...
@@ -263,7 +262,6 @@ func TestTokenRedistribution(t *testing.T) {
func
TestStressLimiter
(
t
*
testing
.
T
)
{
df
:=
func
(
ctx
context
.
Context
,
p
peer
.
ID
,
a
ma
.
Multiaddr
)
(
conn
.
Conn
,
error
)
{
fmt
.
Println
(
"dial for peer: "
,
string
(
p
))
if
tcpPortOver
(
a
,
1000
)
{
return
conn
.
Conn
(
nil
),
nil
}
else
{
...
...
@@ -307,8 +305,6 @@ func TestStressLimiter(t *testing.T) {
}(
peer
.
ID
(
fmt
.
Sprintf
(
"testpeer%d"
,
i
)))
}
time
.
Sleep
(
time
.
Millisecond
*
1000
)
fmt
.
Println
(
"NUM GOROS: "
,
runtime
.
NumGoroutine
())
for
i
:=
0
;
i
<
20
;
i
++
{
select
{
case
<-
success
:
...
...
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