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
297911ca
Commit
297911ca
authored
May 05, 2020
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: fix TestHungRequest by connecting late
parent
906ac8f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
ext_test.go
ext_test.go
+6
-1
No files found.
ext_test.go
View file @
297911ca
...
...
@@ -28,7 +28,7 @@ func TestHungRequest(t *testing.T) {
ctx
,
cancel
:=
context
.
WithCancel
(
context
.
Background
())
defer
cancel
()
mn
,
err
:=
mocknet
.
FullMesh
Connect
ed
(
ctx
,
2
)
mn
,
err
:=
mocknet
.
FullMesh
Link
ed
(
ctx
,
2
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
...
...
@@ -47,6 +47,11 @@ func TestHungRequest(t *testing.T) {
})
}
err
=
mn
.
ConnectAllButSelf
()
if
err
!=
nil
{
t
.
Fatal
(
"failed to connect peers"
,
err
)
}
// Wait at a bit for a peer in our routing table.
for
i
:=
0
;
i
<
100
&&
d
.
routingTable
.
Size
()
==
0
;
i
++
{
time
.
Sleep
(
10
*
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