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
11b94db5
Commit
11b94db5
authored
Jan 19, 2015
by
Juan Batiz-Benet
Browse files
p2p/test/reconnects: faster tests
parent
51f5bce5
Changes
1
Show whitespace changes
Inline
Side-by-side
test/reconnects/reconnect_test.go
View file @
11b94db5
...
@@ -111,7 +111,7 @@ func TestReconnect2(t *testing.T) {
...
@@ -111,7 +111,7 @@ func TestReconnect2(t *testing.T) {
h1
.
SetStreamHandler
(
protocol
.
TestingID
,
EchoStreamHandler
)
h1
.
SetStreamHandler
(
protocol
.
TestingID
,
EchoStreamHandler
)
h2
.
SetStreamHandler
(
protocol
.
TestingID
,
EchoStreamHandler
)
h2
.
SetStreamHandler
(
protocol
.
TestingID
,
EchoStreamHandler
)
rounds
:=
10
rounds
:=
8
if
testing
.
Short
()
{
if
testing
.
Short
()
{
rounds
=
4
rounds
=
4
}
}
...
@@ -137,9 +137,9 @@ func TestReconnect5(t *testing.T) {
...
@@ -137,9 +137,9 @@ func TestReconnect5(t *testing.T) {
h4
.
SetStreamHandler
(
protocol
.
TestingID
,
EchoStreamHandler
)
h4
.
SetStreamHandler
(
protocol
.
TestingID
,
EchoStreamHandler
)
h5
.
SetStreamHandler
(
protocol
.
TestingID
,
EchoStreamHandler
)
h5
.
SetStreamHandler
(
protocol
.
TestingID
,
EchoStreamHandler
)
rounds
:=
10
rounds
:=
4
if
testing
.
Short
()
{
if
testing
.
Short
()
{
rounds
=
4
rounds
=
2
}
}
for
i
:=
0
;
i
<
rounds
;
i
++
{
for
i
:=
0
;
i
<
rounds
;
i
++
{
log
.
Debugf
(
"TestReconnect: %d/%d
\n
"
,
i
,
rounds
)
log
.
Debugf
(
"TestReconnect: %d/%d
\n
"
,
i
,
rounds
)
...
...
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