extra time for dht spin-up

This commit was moved from ipfs/interface-go-ipfs-core@9160e64532

This commit was moved from ipfs/boxo@0ed0b6f39d
This commit is contained in:
Will Scott 2020-04-21 08:40:13 -07:00
parent cdd7cc4776
commit 3a48c52719

View File

@ -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)