test passes
Will Scott committed
Apr 14, 2020 at 16:01 UTC
971cbf747ae3d85d2e9ec9f291e6907807c49822
1 file changed
+5
-5
test/integration/wan_lan_dht_test.go
+5
-5
@@ -7,13 +7,13 @@ import (
7
"math"
8
"math/rand"
9
"net"
10
- "os"
10
"testing"
11
"time"
12
13
"github.com/ipfs/go-cid"
14
"github.com/ipfs/go-ipfs/core"
15
mock "github.com/ipfs/go-ipfs/core/mock"
16
+ libp2p2 "github.com/ipfs/go-ipfs/core/node/libp2p"
17
18
corenet "github.com/libp2p/go-libp2p-core/network"
19
"github.com/libp2p/go-libp2p-core/peerstore"
@@ -93,8 +93,9 @@ func RunDHTConnectivity(conf testutil.LatencyConfig, numPeers int) error {
93
defer connCtxCancel()
94
for i := 0; i < numPeers; i++ {
95
wanPeer, err := core.NewNode(ctx, &core.BuildCfg{
96
- Online: true,
97
- Host: mock.MockHostOption(mn),
96
+ Online: true,
97
+ Routing: libp2p2.DHTServerOption,
98
+ Host: mock.MockHostOption(mn),
99
})
100
if err != nil {
101
return err
@@ -190,7 +191,6 @@ StartupWait:
191
return fmt.Errorf("Unexpected lan peer provided record")
192
}
193
193
- fmt.Fprintf(os.Stderr, "moving on to WAN.\n")
194
// Now, connect with a wan peer.
195
for _, p := range wanPeers {
196
if _, err := mn.LinkPeers(testPeer.Identity, p.Identity); err != nil {
@@ -203,7 +203,7 @@ StartupWait:
203
return err
204
}
205
206
- startupCtx, startupCancel = context.WithTimeout(ctx, time.Second*60*5)
206
+ startupCtx, startupCancel = context.WithTimeout(ctx, time.Second*60)
207
WanStartupWait:
208
for {
209
select {