mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 10:27:46 +08:00
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:
parent
cdd7cc4776
commit
3a48c52719
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user