extra time for dht spin-up

parent 292d906e
...@@ -4,8 +4,9 @@ import ( ...@@ -4,8 +4,9 @@ import (
"context" "context"
"io" "io"
"testing" "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" "github.com/ipfs/interface-go-ipfs-core/options"
) )
...@@ -43,6 +44,8 @@ func (tp *TestSuite) TestDhtFindPeer(t *testing.T) { ...@@ -43,6 +44,8 @@ func (tp *TestSuite) TestDhtFindPeer(t *testing.T) {
t.Fatal("unexpected number of local addrs") t.Fatal("unexpected number of local addrs")
} }
time.Sleep(3 * time.Second)
pi, err := apis[2].Dht().FindPeer(ctx, self0.ID()) pi, err := apis[2].Dht().FindPeer(ctx, self0.ID())
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
...@@ -88,6 +91,8 @@ func (tp *TestSuite) TestDhtFindProviders(t *testing.T) { ...@@ -88,6 +91,8 @@ func (tp *TestSuite) TestDhtFindProviders(t *testing.T) {
t.Fatal(err) t.Fatal(err)
} }
time.Sleep(3 * time.Second)
out, err := apis[2].Dht().FindProviders(ctx, p, options.Dht.NumProviders(1)) out, err := apis[2].Dht().FindProviders(ctx, p, options.Dht.NumProviders(1))
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
...@@ -125,6 +130,8 @@ func (tp *TestSuite) TestDhtProvide(t *testing.T) { ...@@ -125,6 +130,8 @@ func (tp *TestSuite) TestDhtProvide(t *testing.T) {
p := s.Path() p := s.Path()
time.Sleep(3 * time.Second)
out, err := apis[2].Dht().FindProviders(ctx, p, options.Dht.NumProviders(1)) out, err := apis[2].Dht().FindProviders(ctx, p, options.Dht.NumProviders(1))
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment