Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Commit 1fd66fd

Browse files
authored
Merge pull request #34 from ipfs/increase-pin-test-timeouts
test: increase pin test timeouts
2 parents 59b19c1 + 9cd9784 commit 1fd66fd

File tree

1 file changed

+2
-21
lines changed

1 file changed

+2
-21
lines changed

test/pin.js

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ const DaemonFactory = require('ipfsd-ctl')
1212
const utils = require('./utils/pin-utils')
1313

1414
describe('pin', function () {
15-
this.timeout(5 * 1000)
15+
this.timeout(60 * 1000)
16+
this.slow(30 * 1000)
1617

1718
const filePath = 'test/fixtures/planets/jupiter-from-cassini.jpg'
1819
const jupiter = [{
@@ -60,9 +61,6 @@ describe('pin', function () {
6061
describe('pin add', function () {
6162
// Pinning a large file recursively results in the same pins
6263
it('pin recursively', function () {
63-
this.timeout(30 * 1000)
64-
this.slow(30 * 1000)
65-
6664
function pipeline (daemon) {
6765
return daemon.api.add(jupiter, { pin: false })
6866
.then(chunks => daemon.api.pin.add(chunks[0].hash))
@@ -79,9 +77,6 @@ describe('pin', function () {
7977

8078
// Pinning a large file with recursive=false results in the same direct pin
8179
it('pin directly', function () {
82-
this.timeout(30 * 1000)
83-
this.slow(20 * 1000)
84-
8580
function pipeline (daemon) {
8681
return daemon.api.add(jupiter, { pin: false })
8782
.then(chunks => daemon.api.pin.add(chunks[0].hash, { recursive: false }))
@@ -101,9 +96,6 @@ describe('pin', function () {
10196
// removing a root pin removes children as long as they're
10297
// not part of another pin's dag
10398
it('pin recursively, remove the root pin', function () {
104-
this.timeout(20 * 1000)
105-
this.slow(20 * 1000)
106-
10799
function pipeline (daemon) {
108100
return daemon.api.add(jupiter)
109101
.then(chunks => {
@@ -123,9 +115,6 @@ describe('pin', function () {
123115
// When a pin contains the root of another pin and we remove it, it is
124116
// instead kept but its type is changed to 'indirect'
125117
it('remove a child shared by multiple pins', function () {
126-
this.timeout(20 * 1000)
127-
this.slow(20 * 1000)
128-
129118
let jupiterDir
130119
function pipeline (daemon) {
131120
return daemon.api.add(jupiter, { pin: false })
@@ -156,8 +145,6 @@ describe('pin', function () {
156145

157146
describe('ls', function () {
158147
it('print same pins', function () {
159-
this.timeout(30 * 1000)
160-
161148
function pipeline (daemon) {
162149
return daemon.api.add(jupiter)
163150
.then(() => daemon.api.pin.ls())
@@ -197,9 +184,6 @@ describe('pin', function () {
197184
// js-ipfs can read pins stored by go-ipfs
198185
// tests that go's pin.flush and js' pin.load are compatible
199186
it('go -> js', function () {
200-
this.timeout(20 * 1000)
201-
this.slow(15000)
202-
203187
return pipeline({ first: 'go', second: 'js' })
204188
.then(([goPins, jsPins]) => {
205189
expect(goPins.length).to.be.gt(0)
@@ -213,9 +197,6 @@ describe('pin', function () {
213197
it.skip('js -> go', function () {
214198
// skipped because go can not be spawned on a js repo due to changes in
215199
// the DataStore config [link]
216-
this.timeout(20 * 1000)
217-
this.slow(15000)
218-
219200
return pipeline({ first: 'js', second: 'go' })
220201
.then(([jsPins, goPins]) => {
221202
expect(jsPins.length).to.be.gt(0)

0 commit comments

Comments
 (0)