Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 28a6bdc

Browse files
committed
Mitigate test timing issues.
Though one of these is a fix (using 'before' properly), the rest are timing issues that are more noticeable on slower computers.
1 parent 472760f commit 28a6bdc

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

test/cli/test-bitswap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const createTempNode = require('../utils/temp-node')
1212
const repoPath = require('./index').repoPath
1313

1414
describe('bitswap', function () {
15-
this.timeout(20000)
15+
this.timeout(40000)
1616
const env = _.clone(process.env)
1717
env.IPFS_PATH = repoPath
1818

test/core/both/test-bitswap.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ describe('bitswap', () => {
101101
})
102102

103103
afterEach((done) => {
104-
setTimeout(() => ipfs.goOffline(done), 500)
104+
// ipfs.goOffline(done)
105+
setTimeout(() => ipfs.goOffline(done), 1500)
105106
})
106107

107108
it('2 peers', (done) => {

test/core/node-only/test-swarm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const parallel = require('run-parallel')
77
const createTempNode = require('../../utils/temp-node')
88

99
describe('swarm', function () {
10-
this.timeout(20 * 1000)
10+
this.timeout(40 * 1000)
1111

1212
let nodeA
1313
let nodeB

test/http-api/test-files.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ module.exports = (httpAPI) => {
99
describe('api', () => {
1010
let api
1111

12-
it('api', () => {
12+
before((done) => {
1313
api = httpAPI.server.select('API')
14+
done()
1415
})
1516

1617
describe('/files/cat', () => {

0 commit comments

Comments
 (0)