Skip to content

Commit

Permalink
fix: content routing
Browse files Browse the repository at this point in the history
  • Loading branch information
vasco-santos committed Mar 29, 2019
1 parent c81692d commit 2fb1ab1
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 17 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"dirty-chai": "^2.0.1",
"go-libp2p-dep": "^6.0.30",
"libp2p-daemon": "~0.2.0",
"libp2p-daemon-client": "~0.1.1",
"libp2p-daemon-client": "~0.1.2",
"multiaddr": "^6.0.6",
"rimraf": "^2.6.3"
},
Expand Down
2 changes: 0 additions & 2 deletions test/dht/content-routing/go2go.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ describe('dht.contentRouting', () => {
})

it('go peer to go peer', async function () {
this.timeout(30 * 1000)

const cid = new CID('QmVzw6MPsF96TyXBSRs1ptLoVMWRv5FCYJZZGJSVB2Hp39')

await daemons[0].client.dht.provide(cid)
Expand Down
2 changes: 0 additions & 2 deletions test/dht/content-routing/go2js.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ describe('dht.contentRouting', () => {
})

it('go peer to js peer', async function () {
this.timeout(30 * 1000)

const cid = new CID('QmVzw6MPsF96TyXBSRs1ptLoVMWRv5FCYJZZGJSVB2Hp39')

await daemons[0].client.dht.provide(cid)
Expand Down
2 changes: 0 additions & 2 deletions test/dht/content-routing/js2go.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ describe('dht.contentRouting', () => {
})

it('go peer to js peer', async function () {
this.timeout(30 * 1000)

const cid = new CID('QmVzw6MPsF96TyXBSRs1ptLoVMWRv5FCYJZZGJSVB2Hp39')

await daemons[0].client.dht.provide(cid)
Expand Down
2 changes: 0 additions & 2 deletions test/dht/content-routing/js2js.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ describe('dht.contentRouting', () => {
})

it('js peer to js peer', async function () {
this.timeout(30 * 1000)

const cid = new CID('QmVzw6MPsF96TyXBSRs1ptLoVMWRv5FCYJZZGJSVB2Hp39')

await daemons[0].client.dht.provide(cid)
Expand Down
2 changes: 0 additions & 2 deletions test/dht/peer-routing/go2go.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ describe('dht.peerRouting', () => {
})

it('go peer to go peer', async function () {
this.timeout(10 * 1000)

const identify1 = await daemons[1].client.identify()
const identify2 = await daemons[2].client.identify()

Expand Down
2 changes: 0 additions & 2 deletions test/dht/peer-routing/go2js.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ describe('dht.peerRouting', () => {
})

it('go peer to js peer', async function () {
this.timeout(10 * 1000)

const identify1 = await daemons[1].client.identify()
const identify2 = await daemons[2].client.identify()

Expand Down
5 changes: 3 additions & 2 deletions test/dht/peer-routing/js2go.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ describe('dht.peerRouting', () => {
})

it('js peer to go peer', async function () {
this.timeout(10 * 1000)

const identify1 = await daemons[1].client.identify()
const identify2 = await daemons[2].client.identify()

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

// daemons[0] will take some time to have the peers in the routing table
await new Promise(resolve => setTimeout(resolve, 1000))

// peer 1 find peer 2
const peerInfo = await daemons[1].client.dht.findPeer(identify2.peerId)

Expand Down
5 changes: 3 additions & 2 deletions test/dht/peer-routing/js2js.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ describe('dht.peerRouting', () => {
})

it('js peer to js peer', async function () {
this.timeout(10 * 1000)

const identify1 = await daemons[1].client.identify()
const identify2 = await daemons[2].client.identify()

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

// daemons[0] will take some time to have the peers in the routing table
await new Promise(resolve => setTimeout(resolve, 1000))

// peer 1 find peer 2
const peerInfo = await daemons[1].client.dht.findPeer(identify2.peerId)

Expand Down

0 comments on commit 2fb1ab1

Please sign in to comment.