@@ -19,15 +19,16 @@ describe('preload', () => {
19
19
let repo
20
20
21
21
before ( function ( done ) {
22
- this . timeout ( 20 * 1000 )
22
+ this . timeout ( 50 * 1000 )
23
23
24
24
repo = createTempRepo ( )
25
25
ipfs = new IPFS ( {
26
26
repo,
27
27
config : {
28
28
Addresses : {
29
29
Swarm : [ ]
30
- }
30
+ } ,
31
+ Bootstrap : [ ]
31
32
} ,
32
33
preload : {
33
34
enabled : true ,
@@ -44,25 +45,25 @@ describe('preload', () => {
44
45
} )
45
46
46
47
after ( function ( done ) {
47
- this . timeout ( 20 * 1000 )
48
+ this . timeout ( 50 * 1000 )
48
49
ipfs . stop ( done )
49
50
} )
50
51
51
52
after ( function ( done ) {
52
- this . timeout ( 20 * 1000 )
53
+ this . timeout ( 50 * 1000 )
53
54
repo . teardown ( done )
54
55
} )
55
56
56
57
it ( 'should preload content added with add' , function ( done ) {
57
- this . timeout ( 20 * 1000 )
58
+ this . timeout ( 50 * 1000 )
58
59
ipfs . add ( Buffer . from ( hat ( ) ) , ( err , res ) => {
59
60
expect ( err ) . to . not . exist ( )
60
61
MockPreloadNode . waitForCids ( res [ 0 ] . hash , done )
61
62
} )
62
63
} )
63
64
64
65
it ( 'should preload multiple content added with add' , function ( done ) {
65
- this . timeout ( 20 * 1000 )
66
+ this . timeout ( 50 * 1000 )
66
67
ipfs . add ( [ {
67
68
content : Buffer . from ( hat ( ) )
68
69
} , {
@@ -76,7 +77,7 @@ describe('preload', () => {
76
77
} )
77
78
78
79
it ( 'should preload multiple content and intermediate dirs added with add' , function ( done ) {
79
- this . timeout ( 20 * 1000 )
80
+ this . timeout ( 50 * 1000 )
80
81
ipfs . add ( [ {
81
82
path : 'dir0/dir1/file0' ,
82
83
content : Buffer . from ( hat ( ) )
@@ -97,7 +98,7 @@ describe('preload', () => {
97
98
} )
98
99
99
100
it ( 'should preload multiple content and wrapping dir for content added with add and wrapWithDirectory option' , function ( done ) {
100
- this . timeout ( 20 * 1000 )
101
+ this . timeout ( 50 * 1000 )
101
102
ipfs . add ( [ {
102
103
path : 'dir0/dir1/file0' ,
103
104
content : Buffer . from ( hat ( ) )
@@ -118,7 +119,7 @@ describe('preload', () => {
118
119
} )
119
120
120
121
it ( 'should preload content retrieved with cat' , function ( done ) {
121
- this . timeout ( 20 * 1000 )
122
+ this . timeout ( 50 * 1000 )
122
123
ipfs . add ( Buffer . from ( hat ( ) ) , { preload : false } , ( err , res ) => {
123
124
expect ( err ) . to . not . exist ( )
124
125
ipfs . cat ( res [ 0 ] . hash , ( err ) => {
@@ -129,7 +130,7 @@ describe('preload', () => {
129
130
} )
130
131
131
132
it ( 'should preload content retrieved with get' , function ( done ) {
132
- this . timeout ( 20 * 1000 )
133
+ this . timeout ( 50 * 1000 )
133
134
ipfs . add ( Buffer . from ( hat ( ) ) , { preload : false } , ( err , res ) => {
134
135
expect ( err ) . to . not . exist ( )
135
136
ipfs . get ( res [ 0 ] . hash , ( err ) => {
@@ -140,7 +141,7 @@ describe('preload', () => {
140
141
} )
141
142
142
143
it ( 'should preload content retrieved with ls' , function ( done ) {
143
- this . timeout ( 20 * 1000 )
144
+ this . timeout ( 50 * 1000 )
144
145
ipfs . add ( [ {
145
146
path : 'dir0/dir1/file0' ,
146
147
content : Buffer . from ( hat ( ) )
@@ -169,23 +170,23 @@ describe('preload', () => {
169
170
} )
170
171
171
172
it ( 'should preload content added with object.new' , function ( done ) {
172
- this . timeout ( 20 * 1000 )
173
+ this . timeout ( 50 * 1000 )
173
174
ipfs . object . new ( ( err , cid ) => {
174
175
expect ( err ) . to . not . exist ( )
175
176
MockPreloadNode . waitForCids ( cid . toBaseEncodedString ( ) , done )
176
177
} )
177
178
} )
178
179
179
180
it ( 'should preload content added with object.put' , function ( done ) {
180
- this . timeout ( 20 * 1000 )
181
+ this . timeout ( 50 * 1000 )
181
182
ipfs . object . put ( { Data : Buffer . from ( hat ( ) ) , Links : [ ] } , ( err , cid ) => {
182
183
expect ( err ) . to . not . exist ( )
183
184
MockPreloadNode . waitForCids ( cid . toBaseEncodedString ( ) , done )
184
185
} )
185
186
} )
186
187
187
188
it ( 'should preload content added with object.patch.addLink' , function ( done ) {
188
- this . timeout ( 20 * 1000 )
189
+ this . timeout ( 50 * 1000 )
189
190
parallel ( {
190
191
parent : ( cb ) => {
191
192
waterfall ( [
@@ -214,7 +215,7 @@ describe('preload', () => {
214
215
} )
215
216
216
217
it ( 'should preload content added with object.patch.rmLink' , function ( done ) {
217
- this . timeout ( 20 * 1000 )
218
+ this . timeout ( 50 * 1000 )
218
219
waterfall ( [
219
220
( cb ) => ipfs . object . put ( { Data : Buffer . from ( hat ( ) ) , Links : [ ] } , cb ) ,
220
221
( cid , cb ) => ipfs . object . get ( cid , ( err , node ) => cb ( err , { node, cid } ) ) ,
@@ -239,7 +240,7 @@ describe('preload', () => {
239
240
} )
240
241
241
242
it ( 'should preload content added with object.patch.setData' , function ( done ) {
242
- this . timeout ( 20 * 1000 )
243
+ this . timeout ( 50 * 1000 )
243
244
ipfs . object . put ( { Data : Buffer . from ( hat ( ) ) , Links : [ ] } , ( err , cid ) => {
244
245
expect ( err ) . to . not . exist ( )
245
246
@@ -251,7 +252,7 @@ describe('preload', () => {
251
252
} )
252
253
253
254
it ( 'should preload content added with object.patch.appendData' , function ( done ) {
254
- this . timeout ( 20 * 1000 )
255
+ this . timeout ( 50 * 1000 )
255
256
ipfs . object . put ( { Data : Buffer . from ( hat ( ) ) , Links : [ ] } , ( err , cid ) => {
256
257
expect ( err ) . to . not . exist ( )
257
258
@@ -263,7 +264,7 @@ describe('preload', () => {
263
264
} )
264
265
265
266
it ( 'should preload content retrieved with object.get' , function ( done ) {
266
- this . timeout ( 20 * 1000 )
267
+ this . timeout ( 50 * 1000 )
267
268
ipfs . object . new ( null , { preload : false } , ( err , cid ) => {
268
269
expect ( err ) . to . not . exist ( )
269
270
@@ -275,15 +276,15 @@ describe('preload', () => {
275
276
} )
276
277
277
278
it ( 'should preload content added with block.put' , function ( done ) {
278
- this . timeout ( 20 * 1000 )
279
+ this . timeout ( 50 * 1000 )
279
280
ipfs . block . put ( Buffer . from ( hat ( ) ) , ( err , block ) => {
280
281
expect ( err ) . to . not . exist ( )
281
282
MockPreloadNode . waitForCids ( block . cid . toBaseEncodedString ( ) , done )
282
283
} )
283
284
} )
284
285
285
286
it ( 'should preload content retrieved with block.get' , function ( done ) {
286
- this . timeout ( 20 * 1000 )
287
+ this . timeout ( 50 * 1000 )
287
288
ipfs . block . put ( Buffer . from ( hat ( ) ) , { preload : false } , ( err , block ) => {
288
289
expect ( err ) . to . not . exist ( )
289
290
ipfs . block . get ( block . cid , ( err ) => {
@@ -294,7 +295,7 @@ describe('preload', () => {
294
295
} )
295
296
296
297
it ( 'should preload content retrieved with block.stat' , function ( done ) {
297
- this . timeout ( 20 * 1000 )
298
+ this . timeout ( 50 * 1000 )
298
299
ipfs . block . put ( Buffer . from ( hat ( ) ) , { preload : false } , ( err , block ) => {
299
300
expect ( err ) . to . not . exist ( )
300
301
ipfs . block . stat ( block . cid , ( err ) => {
@@ -305,7 +306,7 @@ describe('preload', () => {
305
306
} )
306
307
307
308
it ( 'should preload content added with dag.put' , function ( done ) {
308
- this . timeout ( 20 * 1000 )
309
+ this . timeout ( 50 * 1000 )
309
310
const obj = { test : hat ( ) }
310
311
ipfs . dag . put ( obj , { format : 'dag-cbor' , hashAlg : 'sha2-256' } , ( err , cid ) => {
311
312
expect ( err ) . to . not . exist ( )
@@ -314,7 +315,7 @@ describe('preload', () => {
314
315
} )
315
316
316
317
it ( 'should preload content retrieved with dag.get' , function ( done ) {
317
- this . timeout ( 20 * 1000 )
318
+ this . timeout ( 50 * 1000 )
318
319
const obj = { test : hat ( ) }
319
320
const opts = { format : 'dag-cbor' , hashAlg : 'sha2-256' , preload : false }
320
321
ipfs . dag . put ( obj , opts , ( err , cid ) => {
@@ -328,7 +329,7 @@ describe('preload', () => {
328
329
} )
329
330
330
331
describe ( 'preload disabled' , function ( ) {
331
- this . timeout ( 20 * 1000 )
332
+ this . timeout ( 50 * 1000 )
332
333
let ipfs
333
334
let repo
334
335
0 commit comments