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
a6a239fe
Commit
a6a239fe
authored
May 05, 2020
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: fix TestNotFound bootstrapping
parent
5111cf87
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
ext_test.go
ext_test.go
+10
-4
No files found.
ext_test.go
View file @
a6a239fe
...
...
@@ -232,10 +232,6 @@ func TestNotFound(t *testing.T) {
t
.
Fatal
(
err
)
}
for
_
,
p
:=
range
hosts
{
d
.
peerFound
(
ctx
,
p
.
ID
(),
true
)
}
// Reply with random peers to every message
for
_
,
host
:=
range
hosts
{
host
:=
host
// shadow loop var
...
...
@@ -271,6 +267,16 @@ func TestNotFound(t *testing.T) {
}
})
}
for
_
,
peer
:=
range
hosts
{
if
host
==
peer
{
continue
}
_
=
peer
.
Peerstore
()
.
AddProtocols
(
host
.
ID
(),
protocol
.
ConvertToStrings
(
d
.
serverProtocols
)
...
)
}
}
for
_
,
p
:=
range
hosts
{
d
.
peerFound
(
ctx
,
p
.
ID
(),
true
)
}
// long timeout to ensure timing is not at play.
...
...
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