Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit a96548b

Browse files
vasco-santosAlan Shaw
authored andcommitted
test: increase dht test timeouts (#408)
1 parent 4e6baa0 commit a96548b

File tree

5 files changed

+25
-5
lines changed

5 files changed

+25
-5
lines changed

js/src/dht/findpeer.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ module.exports = (createCommon, options) => {
3535
})
3636
})
3737

38-
after((done) => common.teardown(done))
38+
after(function (done) {
39+
this.timeout(50 * 1000)
40+
41+
common.teardown(done)
42+
})
3943

4044
it('should find other peers', (done) => {
4145
nodeA.dht.findpeer(nodeB.peerId.id, (err, peer) => {

js/src/dht/findprovs.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ module.exports = (createCommon, options) => {
4747
})
4848
})
4949

50-
after((done) => common.teardown(done))
50+
after(function (done) {
51+
this.timeout(50 * 1000)
52+
53+
common.teardown(done)
54+
})
5155

5256
it('should provide from one node and find it through another node', function (done) {
5357
this.timeout(80 * 1000)

js/src/dht/get.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ module.exports = (createCommon, options) => {
3636
})
3737
})
3838

39-
after((done) => common.teardown(done))
39+
after(function (done) {
40+
this.timeout(50 * 1000)
41+
42+
common.teardown(done)
43+
})
4044

4145
it('should error when getting a non-existent key from the DHT', (done) => {
4246
nodeA.dht.get('non-existing', { timeout: '100ms' }, (err, value) => {

js/src/dht/provide.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@ module.exports = (createCommon, options) => {
3232
})
3333
})
3434

35-
after((done) => common.teardown(done))
35+
after(function (done) {
36+
this.timeout(50 * 1000)
37+
38+
common.teardown(done)
39+
})
3640

3741
it('should provide local CID', (done) => {
3842
ipfs.add(Buffer.from('test'), (err, res) => {

js/src/dht/query.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ module.exports = (createCommon, options) => {
3535
})
3636
})
3737

38-
after((done) => common.teardown(done))
38+
after(function (done) {
39+
this.timeout(50 * 1000)
40+
41+
common.teardown(done)
42+
})
3943

4044
it('should return the other node in the query', function (done) {
4145
const timeout = 150 * 1000

0 commit comments

Comments
 (0)