Skip to content

Commit 2fb1ab1

Browse files
committed
fix: content routing
1 parent c81692d commit 2fb1ab1

File tree

9 files changed

+7
-17
lines changed

9 files changed

+7
-17
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"dirty-chai": "^2.0.1",
3636
"go-libp2p-dep": "^6.0.30",
3737
"libp2p-daemon": "~0.2.0",
38-
"libp2p-daemon-client": "~0.1.1",
38+
"libp2p-daemon-client": "~0.1.2",
3939
"multiaddr": "^6.0.6",
4040
"rimraf": "^2.6.3"
4141
},

test/dht/content-routing/go2go.js

-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ describe('dht.contentRouting', () => {
3636
})
3737

3838
it('go peer to go peer', async function () {
39-
this.timeout(30 * 1000)
40-
4139
const cid = new CID('QmVzw6MPsF96TyXBSRs1ptLoVMWRv5FCYJZZGJSVB2Hp39')
4240

4341
await daemons[0].client.dht.provide(cid)

test/dht/content-routing/go2js.js

-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ describe('dht.contentRouting', () => {
3636
})
3737

3838
it('go peer to js peer', async function () {
39-
this.timeout(30 * 1000)
40-
4139
const cid = new CID('QmVzw6MPsF96TyXBSRs1ptLoVMWRv5FCYJZZGJSVB2Hp39')
4240

4341
await daemons[0].client.dht.provide(cid)

test/dht/content-routing/js2go.js

-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ describe('dht.contentRouting', () => {
3636
})
3737

3838
it('go peer to js peer', async function () {
39-
this.timeout(30 * 1000)
40-
4139
const cid = new CID('QmVzw6MPsF96TyXBSRs1ptLoVMWRv5FCYJZZGJSVB2Hp39')
4240

4341
await daemons[0].client.dht.provide(cid)

test/dht/content-routing/js2js.js

-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ describe('dht.contentRouting', () => {
3636
})
3737

3838
it('js peer to js peer', async function () {
39-
this.timeout(30 * 1000)
40-
4139
const cid = new CID('QmVzw6MPsF96TyXBSRs1ptLoVMWRv5FCYJZZGJSVB2Hp39')
4240

4341
await daemons[0].client.dht.provide(cid)

test/dht/peer-routing/go2go.js

-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ describe('dht.peerRouting', () => {
2626
})
2727

2828
it('go peer to go peer', async function () {
29-
this.timeout(10 * 1000)
30-
3129
const identify1 = await daemons[1].client.identify()
3230
const identify2 = await daemons[2].client.identify()
3331

test/dht/peer-routing/go2js.js

-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ describe('dht.peerRouting', () => {
2626
})
2727

2828
it('go peer to js peer', async function () {
29-
this.timeout(10 * 1000)
30-
3129
const identify1 = await daemons[1].client.identify()
3230
const identify2 = await daemons[2].client.identify()
3331

test/dht/peer-routing/js2go.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ describe('dht.peerRouting', () => {
2626
})
2727

2828
it('js peer to go peer', async function () {
29-
this.timeout(10 * 1000)
30-
3129
const identify1 = await daemons[1].client.identify()
3230
const identify2 = await daemons[2].client.identify()
3331

@@ -38,6 +36,9 @@ describe('dht.peerRouting', () => {
3836
// connect 0 => 2
3937
await daemons[0].client.connect(identify2.peerId, identify2.addrs)
4038

39+
// daemons[0] will take some time to have the peers in the routing table
40+
await new Promise(resolve => setTimeout(resolve, 1000))
41+
4142
// peer 1 find peer 2
4243
const peerInfo = await daemons[1].client.dht.findPeer(identify2.peerId)
4344

test/dht/peer-routing/js2js.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ describe('dht.peerRouting', () => {
2626
})
2727

2828
it('js peer to js peer', async function () {
29-
this.timeout(10 * 1000)
30-
3129
const identify1 = await daemons[1].client.identify()
3230
const identify2 = await daemons[2].client.identify()
3331

@@ -38,6 +36,9 @@ describe('dht.peerRouting', () => {
3836
// connect 0 => 2
3937
await daemons[0].client.connect(identify2.peerId, identify2.addrs)
4038

39+
// daemons[0] will take some time to have the peers in the routing table
40+
await new Promise(resolve => setTimeout(resolve, 1000))
41+
4142
// peer 1 find peer 2
4243
const peerInfo = await daemons[1].client.dht.findPeer(identify2.peerId)
4344

0 commit comments

Comments
 (0)