Skip to content

Commit 4192351

Browse files
StebalienRobin
authored and
Robin
committed
Merge pull request ipfs#61 from ipfs/fix/dht-wait
extra time for dht spin-up
1 parent 3605d23 commit 4192351

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/dht.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"context"
55
"io"
66
"testing"
7+
"time"
78

89
"github.com/TRON-US/interface-go-btfs-core"
910
"github.com/TRON-US/interface-go-btfs-core/options"
@@ -43,6 +44,8 @@ func (tp *TestSuite) TestDhtFindPeer(t *testing.T) {
4344
t.Fatal("unexpected number of local addrs")
4445
}
4546

47+
time.Sleep(3 * time.Second)
48+
4649
pi, err := apis[2].Dht().FindPeer(ctx, self0.ID())
4750
if err != nil {
4851
t.Fatal(err)
@@ -125,6 +128,8 @@ func (tp *TestSuite) TestDhtProvide(t *testing.T) {
125128

126129
p := s.Path()
127130

131+
time.Sleep(3 * time.Second)
132+
128133
out, err := apis[2].Dht().FindProviders(ctx, p, options.Dht.NumProviders(1))
129134
if err != nil {
130135
t.Fatal(err)

0 commit comments

Comments
 (0)