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-kad-dht
Commits
15533c8f
Commit
15533c8f
authored
Oct 22, 2014
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dht test fix (net)
parent
5582e282
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
dht_test.go
dht_test.go
+10
-10
No files found.
dht_test.go
View file @
15533c8f
...
...
@@ -98,8 +98,8 @@ func TestPing(t *testing.T) {
defer
dhtA
.
Halt
()
defer
dhtB
.
Halt
()
defer
dhtA
.
n
etwork
.
Close
()
defer
dhtB
.
n
etwork
.
Close
()
defer
dhtA
.
dialer
.
(
inet
.
N
etwork
)
.
Close
()
defer
dhtB
.
dialer
.
(
inet
.
N
etwork
)
.
Close
()
_
,
err
=
dhtA
.
Connect
(
ctx
,
peerB
)
if
err
!=
nil
{
...
...
@@ -142,8 +142,8 @@ func TestValueGetSet(t *testing.T) {
defer
dhtA
.
Halt
()
defer
dhtB
.
Halt
()
defer
dhtA
.
n
etwork
.
Close
()
defer
dhtB
.
n
etwork
.
Close
()
defer
dhtA
.
dialer
.
(
inet
.
N
etwork
)
.
Close
()
defer
dhtB
.
dialer
.
(
inet
.
N
etwork
)
.
Close
()
_
,
err
=
dhtA
.
Connect
(
ctx
,
peerB
)
if
err
!=
nil
{
...
...
@@ -184,7 +184,7 @@ func TestProvides(t *testing.T) {
defer
func
()
{
for
i
:=
0
;
i
<
4
;
i
++
{
dhts
[
i
]
.
Halt
()
defer
dhts
[
i
]
.
n
etwork
.
Close
()
defer
dhts
[
i
]
.
dialer
.
(
inet
.
N
etwork
)
.
Close
()
}
}()
...
...
@@ -244,7 +244,7 @@ func TestProvidesAsync(t *testing.T) {
defer
func
()
{
for
i
:=
0
;
i
<
4
;
i
++
{
dhts
[
i
]
.
Halt
()
defer
dhts
[
i
]
.
n
etwork
.
Close
()
defer
dhts
[
i
]
.
dialer
.
(
inet
.
N
etwork
)
.
Close
()
}
}()
...
...
@@ -301,7 +301,7 @@ func TestLayeredGet(t *testing.T) {
defer
func
()
{
for
i
:=
0
;
i
<
4
;
i
++
{
dhts
[
i
]
.
Halt
()
defer
dhts
[
i
]
.
n
etwork
.
Close
()
defer
dhts
[
i
]
.
dialer
.
(
inet
.
N
etwork
)
.
Close
()
}
}()
...
...
@@ -354,7 +354,7 @@ func TestFindPeer(t *testing.T) {
defer
func
()
{
for
i
:=
0
;
i
<
4
;
i
++
{
dhts
[
i
]
.
Halt
()
dhts
[
i
]
.
n
etwork
.
Close
()
dhts
[
i
]
.
dialer
.
(
inet
.
N
etwork
)
.
Close
()
}
}()
...
...
@@ -443,8 +443,8 @@ func TestConnectCollision(t *testing.T) {
dhtA
.
Halt
()
dhtB
.
Halt
()
dhtA
.
n
etwork
.
Close
()
dhtB
.
n
etwork
.
Close
()
dhtA
.
dialer
.
(
inet
.
N
etwork
)
.
Close
()
dhtB
.
dialer
.
(
inet
.
N
etwork
)
.
Close
()
<-
time
.
After
(
200
*
time
.
Millisecond
)
}
...
...
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