Skip to content
This repository has been archived by the owner on Jun 19, 2023. It is now read-only.

extra time for dht spin-up #61

Merged
merged 1 commit into from
Apr 21, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion tests/dht.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down