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
p2p
go-p2p-swarm
Commits
dfa2a299
Commit
dfa2a299
authored
May 14, 2016
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test cleanup
parent
0ef8622d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
4 deletions
+0
-4
limiter_test.go
limiter_test.go
+0
-4
No files found.
limiter_test.go
View file @
dfa2a299
...
@@ -3,7 +3,6 @@ package swarm
...
@@ -3,7 +3,6 @@ package swarm
import
(
import
(
"fmt"
"fmt"
"math/rand"
"math/rand"
"runtime"
"strconv"
"strconv"
"testing"
"testing"
"time"
"time"
...
@@ -263,7 +262,6 @@ func TestTokenRedistribution(t *testing.T) {
...
@@ -263,7 +262,6 @@ func TestTokenRedistribution(t *testing.T) {
func
TestStressLimiter
(
t
*
testing
.
T
)
{
func
TestStressLimiter
(
t
*
testing
.
T
)
{
df
:=
func
(
ctx
context
.
Context
,
p
peer
.
ID
,
a
ma
.
Multiaddr
)
(
conn
.
Conn
,
error
)
{
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
)
{
if
tcpPortOver
(
a
,
1000
)
{
return
conn
.
Conn
(
nil
),
nil
return
conn
.
Conn
(
nil
),
nil
}
else
{
}
else
{
...
@@ -307,8 +305,6 @@ func TestStressLimiter(t *testing.T) {
...
@@ -307,8 +305,6 @@ func TestStressLimiter(t *testing.T) {
}(
peer
.
ID
(
fmt
.
Sprintf
(
"testpeer%d"
,
i
)))
}(
peer
.
ID
(
fmt
.
Sprintf
(
"testpeer%d"
,
i
)))
}
}
time
.
Sleep
(
time
.
Millisecond
*
1000
)
fmt
.
Println
(
"NUM GOROS: "
,
runtime
.
NumGoroutine
())
for
i
:=
0
;
i
<
20
;
i
++
{
for
i
:=
0
;
i
<
20
;
i
++
{
select
{
select
{
case
<-
success
:
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