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

Commit

Permalink
Mitigate test timing issues.
Browse files Browse the repository at this point in the history
Though one of these is a fix (using 'before' properly), the rest are
timing issues that are more noticeable on slower computers.
  • Loading branch information
hackergrrl committed May 31, 2016
1 parent 5603e52 commit 98667ad
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/cli/test-bitswap.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const createTempNode = require('../utils/temp-node')
const repoPath = require('./index').repoPath

describe('bitswap', function () {
this.timeout(20000)
this.timeout(40000)
const env = _.clone(process.env)
env.IPFS_PATH = repoPath

Expand Down
3 changes: 2 additions & 1 deletion test/core/both/test-bitswap.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ describe('bitswap', () => {
})

afterEach((done) => {
setTimeout(() => ipfs.goOffline(done), 500)
// ipfs.goOffline(done)
setTimeout(() => ipfs.goOffline(done), 1500)
})

it('2 peers', (done) => {
Expand Down
2 changes: 1 addition & 1 deletion test/core/node-only/test-swarm.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const parallel = require('run-parallel')
const createTempNode = require('../../utils/temp-node')

describe('swarm', function () {
this.timeout(20 * 1000)
this.timeout(40 * 1000)

let nodeA
let nodeB
Expand Down
3 changes: 2 additions & 1 deletion test/http-api/test-files.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ module.exports = (httpAPI) => {
describe('api', () => {
let api

it('api', () => {
before((done) => {
api = httpAPI.server.select('API')
done()
})

describe('/files/cat', () => {
Expand Down

0 comments on commit 98667ad

Please sign in to comment.