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
dms3
interface-go-dms3-core
Commits
835aca2a
Unverified
Commit
835aca2a
authored
Apr 21, 2020
by
Steven Allen
Committed by
GitHub
Apr 21, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #61 from ipfs/fix/dht-wait
extra time for dht spin-up
parents
292d906e
9160e645
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
tests/dht.go
tests/dht.go
+8
-1
No files found.
tests/dht.go
View file @
835aca2a
...
...
@@ -4,8 +4,9 @@ import (
"context"
"io"
"testing"
"time"
"github.com/ipfs/interface-go-ipfs-core"
iface
"github.com/ipfs/interface-go-ipfs-core"
"github.com/ipfs/interface-go-ipfs-core/options"
)
...
...
@@ -43,6 +44,8 @@ func (tp *TestSuite) TestDhtFindPeer(t *testing.T) {
t
.
Fatal
(
"unexpected number of local addrs"
)
}
time
.
Sleep
(
3
*
time
.
Second
)
pi
,
err
:=
apis
[
2
]
.
Dht
()
.
FindPeer
(
ctx
,
self0
.
ID
())
if
err
!=
nil
{
t
.
Fatal
(
err
)
...
...
@@ -88,6 +91,8 @@ func (tp *TestSuite) TestDhtFindProviders(t *testing.T) {
t
.
Fatal
(
err
)
}
time
.
Sleep
(
3
*
time
.
Second
)
out
,
err
:=
apis
[
2
]
.
Dht
()
.
FindProviders
(
ctx
,
p
,
options
.
Dht
.
NumProviders
(
1
))
if
err
!=
nil
{
t
.
Fatal
(
err
)
...
...
@@ -125,6 +130,8 @@ func (tp *TestSuite) TestDhtProvide(t *testing.T) {
p
:=
s
.
Path
()
time
.
Sleep
(
3
*
time
.
Second
)
out
,
err
:=
apis
[
2
]
.
Dht
()
.
FindProviders
(
ctx
,
p
,
options
.
Dht
.
NumProviders
(
1
))
if
err
!=
nil
{
t
.
Fatal
(
err
)
...
...
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