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

Commit be926ba

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 eade807 commit be926ba

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

test/cli-tests/test-bitswap.js

+1-1
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-tests/test-bitswap.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ describe('bitswap', () => {
7070
})
7171

7272
afterEach((done) => {
73-
setTimeout(() => ipfs.goOffline(done), 500)
73+
// ipfs.goOffline(done)
74+
setTimeout(() => ipfs.goOffline(done), 1500)
7475
})
7576

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

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const expect = require('chai').expect
66
const createTempNode = require('../utils/temp-node')
77

88
describe('swarm', function () {
9-
this.timeout(20000)
9+
this.timeout(80000)
1010

1111
var ipfsA
1212
var ipfsB

test/http-api-tests/test-files.js

+2-1
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)